Home
last modified time | relevance | path

Searched refs:bm (Results 1 – 25 of 500) sorted by relevance

12345678910>>...20

/external/mesa3d/src/gallium/auxiliary/util/
Du_bitmask.c66 struct util_bitmask *bm; in util_bitmask_create() local
68 bm = MALLOC_STRUCT(util_bitmask); in util_bitmask_create()
69 if(!bm) in util_bitmask_create()
72 bm->words = (util_bitmask_word *)CALLOC(UTIL_BITMASK_INITIAL_WORDS, sizeof(util_bitmask_word)); in util_bitmask_create()
73 if(!bm->words) { in util_bitmask_create()
74 FREE(bm); in util_bitmask_create()
78 bm->size = UTIL_BITMASK_INITIAL_WORDS * UTIL_BITMASK_BITS_PER_WORD; in util_bitmask_create()
79 bm->filled = 0; in util_bitmask_create()
81 return bm; in util_bitmask_create()
89 util_bitmask_resize(struct util_bitmask *bm, in util_bitmask_resize() argument
[all …]
/external/libvorbis/lib/
Dbitrate.c29 void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){ in vorbis_bitrate_init() argument
33 memset(bm,0,sizeof(*bm)); in vorbis_bitrate_init()
39 bm->short_per_long=ci->blocksizes[1]/ci->blocksizes[0]; in vorbis_bitrate_init()
40 bm->managed=1; in vorbis_bitrate_init()
42 bm->avg_bitsper= rint(1.*bi->avg_rate*halfsamples/ratesamples); in vorbis_bitrate_init()
43 bm->min_bitsper= rint(1.*bi->min_rate*halfsamples/ratesamples); in vorbis_bitrate_init()
44 bm->max_bitsper= rint(1.*bi->max_rate*halfsamples/ratesamples); in vorbis_bitrate_init()
46 bm->avgfloat=PACKETBLOBS/2; in vorbis_bitrate_init()
52 bm->minmax_reservoir=desired_fill; in vorbis_bitrate_init()
53 bm->avg_reservoir=desired_fill; in vorbis_bitrate_init()
[all …]
/external/skia/tests/
DGifTest.cpp48 SkBitmap bm; in test_gif_data_no_colormap() local
49 bool imageDecodeSuccess = decode_memory(data, size, &bm); in test_gif_data_no_colormap()
51 REPORTER_ASSERT(r, bm.width() == 1); in test_gif_data_no_colormap()
52 REPORTER_ASSERT(r, bm.height() == 1); in test_gif_data_no_colormap()
53 REPORTER_ASSERT(r, !(bm.empty())); in test_gif_data_no_colormap()
54 if (!(bm.empty())) { in test_gif_data_no_colormap()
55 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0xFF000000); in test_gif_data_no_colormap()
59 SkBitmap bm; in test_gif_data() local
60 bool imageDecodeSuccess = decode_memory(data, size, &bm); in test_gif_data()
62 REPORTER_ASSERT(r, bm.width() == 3); in test_gif_data()
[all …]
DBitmapTest.cpp16 SkBitmap bm; in test_peekpixels() local
19 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels()
20 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels()
23 bm.setInfo(SkImageInfo::MakeN32Premul(10, 10)); in test_peekpixels()
24 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels()
25 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels()
28 bm.allocPixels(info); in test_peekpixels()
29 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr)); in test_peekpixels()
30 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap)); in test_peekpixels()
31 REPORTER_ASSERT(reporter, pmap.info() == bm.info()); in test_peekpixels()
[all …]
DRectTest.cpp13 static bool has_green_pixels(const SkBitmap& bm) { in has_green_pixels() argument
14 for (int j = 0; j < bm.height(); ++j) { in has_green_pixels()
15 for (int i = 0; i < bm.width(); ++i) { in has_green_pixels()
16 if (SkColorGetG(bm.getColor(i, j))) { in has_green_pixels()
26 SkBitmap bm; in test_stroke_width_clipping() local
27 bm.allocN32Pixels(100, 10); in test_stroke_width_clipping()
28 bm.eraseColor(SK_ColorTRANSPARENT); in test_stroke_width_clipping()
30 SkCanvas canvas(bm); in test_stroke_width_clipping()
41 REPORTER_ASSERT(reporter, !has_green_pixels(bm)); in test_stroke_width_clipping()
46 REPORTER_ASSERT(reporter, has_green_pixels(bm)); in test_stroke_width_clipping()
[all …]
DSpecialImageTest.cpp45 SkBitmap bm; in create_bm() local
46 bm.allocN32Pixels(kFullSize, kFullSize, true); in create_bm()
48 SkCanvas temp(bm); in create_bm()
59 return bm; in create_bm()
93 SkBitmap bm; in test_image() local
94 bm.allocN32Pixels(kFullSize, kFullSize, true); in test_image()
96 bool result = canvas->readPixels(bm.info(), bm.getPixels(), bm.rowBytes(), 0, 0); in test_image()
100 REPORTER_ASSERT(reporter, SK_ColorBLUE == bm.getColor(kPad-1, kPad-1)); in test_image()
101 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kPad, kPad)); in test_image()
102 REPORTER_ASSERT(reporter, SK_ColorRED == bm.getColor(kSmallerSize+kPad-1, in test_image()
[all …]
DDrawBitmapRectTest.cpp38 SkBitmap bm; in test_faulty_pixelref() local
40 bm.setInfo(info); in test_faulty_pixelref()
41 bm.setPixelRef(new FailurePixelRef(info), 0, 0)->unref(); in test_faulty_pixelref()
58 canvas->drawBitmap(bm, 0, 0, &paint); in test_faulty_pixelref()
148 const SkBitmap& bm, bool shouldBeDrawn) { in assert_ifDrawnTo() argument
149 for (int y = 0; y < bm.height(); ++y) { in assert_ifDrawnTo()
150 for (int x = 0; x < bm.width(); ++x) { in assert_ifDrawnTo()
152 if (SK_ColorTRANSPARENT == *bm.getAddr32(x, y)) { in assert_ifDrawnTo()
158 if (SK_ColorTRANSPARENT != *bm.getAddr32(x, y)) { in assert_ifDrawnTo()
185 SkBitmap bm; in test_wacky_bitmapshader() local
[all …]
/external/valgrind/drd/
Ddrd_bitmap.h344 struct bitmap2* bm2_insert(struct bitmap* const bm, const UWord a1);
380 Bool bm_cache_lookup(struct bitmap* const bm, const UWord a1, in bm_cache_lookup() argument
384 tl_assert(bm); in bm_cache_lookup()
392 if (a1 == bm->cache[0].a1) in bm_cache_lookup()
394 *bm2 = bm->cache[0].bm2; in bm_cache_lookup()
399 if (a1 == bm->cache[1].a1) in bm_cache_lookup()
401 *bm2 = bm->cache[1].bm2; in bm_cache_lookup()
406 if (a1 == bm->cache[2].a1) in bm_cache_lookup()
408 *bm2 = bm->cache[2].bm2; in bm_cache_lookup()
409 bm_cache_rotate(bm->cache, 3); in bm_cache_lookup()
[all …]
Dpub_drd_bitmap.h81 void DRD_(bm_delete)(struct bitmap* const bm);
82 void DRD_(bm_init)(struct bitmap* const bm);
83 void DRD_(bm_cleanup)(struct bitmap* const bm);
84 void DRD_(bm_access_range)(struct bitmap* const bm,
87 void DRD_(bm_access_range_load)(struct bitmap* const bm,
89 void DRD_(bm_access_load_1)(struct bitmap* const bm, const Addr a1);
90 void DRD_(bm_access_load_2)(struct bitmap* const bm, const Addr a1);
91 void DRD_(bm_access_load_4)(struct bitmap* const bm, const Addr a1);
92 void DRD_(bm_access_load_8)(struct bitmap* const bm, const Addr a1);
93 void DRD_(bm_access_range_store)(struct bitmap* const bm,
[all …]
Ddrd_bitmap.c71 struct bitmap* bm; in DRD_() local
77 bm = VG_(malloc)("drd.bitmap.bn.1", sizeof(*bm)); in DRD_()
78 DRD_(bm_init)(bm); in DRD_()
80 return bm; in DRD_()
83 void DRD_(bm_delete)(struct bitmap* const bm) in DRD_()
85 tl_assert(bm); in DRD_()
87 DRD_(bm_cleanup)(bm); in DRD_()
88 VG_(free)(bm); in DRD_()
92 void DRD_(bm_init)(struct bitmap* const bm) in DRD_()
96 tl_assert(bm); in DRD_()
[all …]
/external/chromium-trace/catapult/third_party/Paste/tests/test_util/
Dtest_mimeparse.py182 bm = best_match
183 assert bm([], '*/*') == ''
184 assert bm(['application/xbel+xml', 'text/xml'],
186 assert bm(['application/xbel+xml', 'audio/mp3'],
188 assert bm(['application/xbel+xml', 'audio/mp3'],
190 assert bm(['application/xbel+xml', 'text/plain', 'text/html'],
192 assert bm(['application/xbel+xml', 'text/html', 'text/xhtml'],
194 assert bm(['application/xbel+xml', 'text/html', 'text/xhtml'],
196 assert bm(['application/xbel+xml', 'application/xml'],
198 assert bm(['application/xbel+xml', 'application/xml'],
[all …]
/external/skia/gm/
Dshowmiplevels.cpp24 SkBitmap bm; in make_bitmap() local
25 bm.allocN32Pixels(w, h); in make_bitmap()
26 SkCanvas canvas(bm); in make_bitmap()
33 return bm; in make_bitmap()
37 SkBitmap bm; in make_bitmap2() local
38 bm.allocN32Pixels(w, h); in make_bitmap2()
39 SkCanvas canvas(bm); in make_bitmap2()
52 return bm; in make_bitmap2()
57 SkBitmap bm; in make_bitmap3() local
58 bm.allocN32Pixels(w, h); in make_bitmap3()
[all …]
Dspritebitmap.cpp14 static void make_bm(SkBitmap* bm) { in make_bm() argument
15 bm->allocN32Pixels(100, 100); in make_bm()
16 bm->eraseColor(SK_ColorBLUE); in make_bm()
18 SkCanvas canvas(*bm); in make_bm()
25 static void draw_1_bitmap(SkCanvas* canvas, const SkBitmap& bm, bool doClip, in draw_1_bitmap() argument
32 SkIntToScalar(bm.width()), in draw_1_bitmap()
33 SkIntToScalar(bm.height())); in draw_1_bitmap()
38 canvas->translate(SkIntToScalar(bm.width() + 20), 0); in draw_1_bitmap()
44 canvas->drawBitmap(bm, SkIntToScalar(dx), SkIntToScalar(dy), &paint); in draw_1_bitmap()
68 SkBitmap bm; in onDraw() local
[all …]
Dbitmapfilters.cpp11 static void make_bm(SkBitmap* bm) { in make_bm() argument
22 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, in make_bm()
27 *bm->getAddr8(0, 0) = 0; in make_bm()
28 *bm->getAddr8(1, 0) = 1; in make_bm()
29 *bm->getAddr8(0, 1) = 2; in make_bm()
30 *bm->getAddr8(1, 1) = 3; in make_bm()
33 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, in draw_bm() argument
35 canvas->drawBitmap(bm, x, y, paint); in draw_bm()
36 return SkIntToScalar(bm.width()) * 5/4; in draw_bm()
39 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, in draw_set() argument
[all …]
Demboss.cpp15 SkBitmap bm; in make_bm() local
16 bm.allocN32Pixels(100, 100); in make_bm()
18 SkCanvas canvas(bm); in make_bm()
23 return bm; in make_bm()
42 SkBitmap bm = make_bm(); in onDraw() local
43 canvas->drawBitmap(bm, 10, 10, &paint); in onDraw()
47 canvas->translate(bm.width() + SkIntToScalar(10), 0); in onDraw()
48 canvas->drawBitmap(bm, 10, 10, &paint); in onDraw()
53 canvas->translate(bm.width() + SkIntToScalar(10), 0); in onDraw()
54 canvas->drawBitmap(bm, 10, 10, &paint); in onDraw()
Dbitmaprecttest.cpp12 static void make_bm(SkBitmap* bm) { in make_bm() argument
13 bm->allocN32Pixels(60, 60); in make_bm()
14 bm->eraseColor(0); in make_bm()
16 SkCanvas canvas(*bm); in make_bm()
38 SkBitmap bm; variable
39 make_bm(&bm);
41 canvas->drawBitmap(bm, 150, 45, nullptr);
46 canvas->drawBitmapRect(bm, SkRect::MakeXYWH(100, 100, 128, 128), nullptr);
50 canvas->drawBitmap(bm, -310, 45, nullptr);
/external/skia/src/images/
DSkImageDecoder_libgif.cpp27 Result onDecode(SkStream* stream, SkBitmap* bm, Mode mode) override;
155 static SkImageDecoder::Result error_return(const SkBitmap& bm, const char msg[]) { in error_return() argument
158 msg, bm.width(), bm.height(), bm.getPixels(), in error_return()
159 bm.getColorTable()); in error_return()
164 static void gif_warning(const SkBitmap& bm, const char msg[]) { in gif_warning() argument
167 msg, bm.width(), bm.height(), bm.getPixels(), in gif_warning()
168 bm.getColorTable()); in gif_warning()
195 static void sanitize_indexed_bitmap(SkBitmap* bm) { in sanitize_indexed_bitmap() argument
196 if ((kIndex_8_SkColorType == bm->colorType()) && !(bm->empty())) { in sanitize_indexed_bitmap()
197 SkAutoLockPixels alp(*bm); in sanitize_indexed_bitmap()
[all …]
DSkImageEncoder.cpp17 bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, in encodeStream() argument
20 return this->onEncode(stream, bm, quality); in encodeStream()
23 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, in encodeFile() argument
27 return this->onEncode(&stream, bm, quality); in encodeFile()
30 SkData* SkImageEncoder::encodeData(const SkBitmap& bm, int quality) { in encodeData() argument
33 if (this->onEncode(&stream, bm, quality)) { in encodeData()
39 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap& bm, Type t, in EncodeFile() argument
42 return enc.get() && enc.get()->encodeFile(file, bm, quality); in EncodeFile()
45 bool SkImageEncoder::EncodeStream(SkWStream* stream, const SkBitmap& bm, Type t, in EncodeStream() argument
48 return enc.get() && enc.get()->encodeStream(stream, bm, quality); in EncodeStream()
[all …]
DSkMovie_gif.cpp133 static void copyInterlaceGroup(SkBitmap* bm, const unsigned char*& src, in copyInterlaceGroup() argument
141 uint32_t* dst = bm->getAddr32(imageDesc.Left, imageDesc.Top + row); in copyInterlaceGroup()
150 static void blitInterlace(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, in blitInterlace() argument
153 int width = bm->width(); in blitInterlace()
154 int height = bm->height(); in blitInterlace()
169 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 0); in blitInterlace()
172 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 4); in blitInterlace()
175 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 4, 2); in blitInterlace()
177 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 2, 1); in blitInterlace()
181 static void blitNormal(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, in blitNormal() argument
[all …]
/external/v8/test/unittests/heap/
Dbitmap-unittest.cc49 Bitmap* bm = bitmap(); in TEST_F() local
50 bm->cells()[1] = kBlackCell; in TEST_F()
76 Bitmap* bm = bitmap(); in TEST_F() local
77 EXPECT_TRUE(bm->IsClean()); in TEST_F()
78 bm->cells()[0] = kBlackCell; in TEST_F()
79 EXPECT_FALSE(bm->IsClean()); in TEST_F()
84 Bitmap* bm = bitmap(); in TEST_F() local
85 bm->cells()[0] = kBlackCell; in TEST_F()
86 bm->cells()[1] = kBlackCell; in TEST_F()
87 bm->cells()[2] = kBlackCell; in TEST_F()
[all …]
/external/skia/samplecode/
DSampleFilter.cpp25 static void make_bm(SkBitmap* bm) { in make_bm() argument
31 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, in make_bm()
36 *bm->getAddr8(0, 0) = 0; in make_bm()
37 *bm->getAddr8(1, 0) = 1; in make_bm()
38 *bm->getAddr8(0, 1) = 2; in make_bm()
39 *bm->getAddr8(1, 1) = 3; in make_bm()
42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, in draw_bm() argument
44 canvas->drawBitmap(bm, x, y, paint); in draw_bm()
45 return SkIntToScalar(bm.width()) * 5/4; in draw_bm()
48 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p) { in draw_set() argument
[all …]
DSampleHairline.cpp51 static bool check_bitmap_margin(const SkBitmap& bm, int margin) { in check_bitmap_margin() argument
52 size_t rb = bm.rowBytes(); in check_bitmap_margin()
54 if (!check_zeros(bm.getAddr32(0, i), bm.width(), 1)) { in check_bitmap_margin()
57 int bottom = bm.height() - i - 1; in check_bitmap_margin()
58 if (!check_zeros(bm.getAddr32(0, bottom), bm.width(), 1)) { in check_bitmap_margin()
62 if (!check_zeros(bm.getAddr32(i, 0), bm.height(), SkToInt(rb >> 2))) { in check_bitmap_margin()
65 int right = bm.width() - margin + i; in check_bitmap_margin()
66 if (!check_zeros(bm.getAddr32(right, 0), bm.height(), in check_bitmap_margin()
79 const SkBitmap& bm) { in line_proc() argument
86 if (!check_bitmap_margin(bm, MARGIN)) { in line_proc()
[all …]
DSampleTinyBitmap.cpp24 SkBitmap bm; in make_bitmap() local
25 bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType, in make_bitmap()
30 bm.lockPixels(); in make_bitmap()
31 for (int y = 0; y < bm.height(); y++) { in make_bitmap()
32 uint8_t* p = bm.getAddr8(0, y); in make_bitmap()
33 for (int x = 0; x < bm.width(); x++) { in make_bitmap()
37 bm.unlockPixels(); in make_bitmap()
38 return bm; in make_bitmap()
59 static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { in setBitmapOpaque() argument
60 SkAutoLockPixels alp(*bm); // needed for ctable in setBitmapOpaque()
[all …]
/external/skia/src/pdf/
DSkPDFBitmap.cpp43 SkBitmap bm; in image_compute_is_opaque() local
44 image_get_ro_pixels(image, &bm); in image_compute_is_opaque()
45 return SkBitmap::ComputeIsOpaque(bm); in image_compute_is_opaque()
113 static void get_neighbor_avg_color(const SkBitmap& bm, in get_neighbor_avg_color() argument
121 int ymax = SkTMin(yOrig + 1, bm.height() - 1); in get_neighbor_avg_color()
123 int xmax = SkTMin(xOrig + 1, bm.width() - 1); in get_neighbor_avg_color()
125 uint32_t* scanline = bm.getAddr32(0, y); in get_neighbor_avg_color()
143 static size_t pixel_count(const SkBitmap& bm) { in pixel_count() argument
144 return SkToSizeT(bm.width()) * SkToSizeT(bm.height()); in pixel_count()
183 const SkBitmap& bm = not4444(bitmap, &copy); in bitmap_to_pdf_pixels() local
[all …]
/external/skia/src/ports/
DSkImageDecoder_CG.cpp59 virtual Result onDecode(SkStream* stream, SkBitmap* bm, Mode);
82 static void force_opaque(SkBitmap* bm) { in force_opaque() argument
83 SkAutoLockPixels alp(*bm); in force_opaque()
84 if (!bm->getPixels()) { in force_opaque()
89 switch (bm->colorType()) { in force_opaque()
104 char* row = (char*)bm->getPixels(); in force_opaque()
105 for (int y = 0; y < bm->height(); ++y) { in force_opaque()
106 proc(row, bm->width()); in force_opaque()
107 row += bm->rowBytes(); in force_opaque()
109 bm->setAlphaType(kOpaque_SkAlphaType); in force_opaque()
[all …]

12345678910>>...20