/external/mesa3d/src/gallium/auxiliary/util/ |
D | u_bitmask.c | 66 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/ |
D | bitrate.c | 29 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/ |
D | GifTest.cpp | 57 SkBitmap bm; in test_gif_data_no_colormap() local 59 data, size, &bm); in test_gif_data_no_colormap() 61 REPORTER_ASSERT(r, bm.width() == 1); in test_gif_data_no_colormap() 62 REPORTER_ASSERT(r, bm.height() == 1); in test_gif_data_no_colormap() 63 REPORTER_ASSERT(r, !(bm.empty())); in test_gif_data_no_colormap() 64 if (!(bm.empty())) { in test_gif_data_no_colormap() 65 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0x00000000); in test_gif_data_no_colormap() 69 SkBitmap bm; in test_gif_data() local 71 data, size, &bm); in test_gif_data() 73 REPORTER_ASSERT(r, bm.width() == 3); in test_gif_data() [all …]
|
D | BitmapTest.cpp | 18 SkBitmap bm; in test_bigalloc() local 19 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info)); in test_bigalloc() 31 SkBitmap bm; in test_allocpixels() local 32 bm.setInfo(info); in test_allocpixels() 33 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels() 34 bm.allocPixels(); in test_allocpixels() 35 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels() 36 bm.reset(); in test_allocpixels() 37 bm.allocPixels(info); in test_allocpixels() 38 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels() [all …]
|
D | ImageDecodingTest.cpp | 175 SkBitmap bm; in test_alphaType() local 186 bool success = decoder->decode(&stream, &bm, kN32_SkColorType, in test_alphaType() 197 const SkAlphaType boundsAlphaType = bm.alphaType(); in test_alphaType() 206 success = decoder->decode(&stream, &bm, kN32_SkColorType, SkImageDecoder::kDecodePixels_Mode); in test_alphaType() 232 REPORTER_ASSERT(reporter, bm.alphaType() == boundsAlphaType in test_alphaType() 233 || bm.alphaType() == kOpaque_SkAlphaType); in test_alphaType() 272 SkBitmap bm; in DEF_TEST() local 290 bool success = decoder->decode(&stream, &bm, kN32_SkColorType, in DEF_TEST() 297 REPORTER_ASSERT(reporter, bm.width() == 1 && bm.height() == 1); in DEF_TEST() 299 SkAutoLockPixels alp(bm); in DEF_TEST() [all …]
|
D | RectTest.cpp | 13 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()
|
D | DrawBitmapRectTest.cpp | 35 SkBitmap bm; in test_faulty_pixelref() local 36 bool installSuccess = SkInstallDiscardablePixelRef(SkNEW(FailureImageGenerator), &bm, pool); in test_faulty_pixelref() 54 canvas->drawBitmap(bm, 0, 0, &paint); in test_faulty_pixelref() 146 const SkBitmap& bm, bool shouldBeDrawn) { in assert_ifDrawnTo() argument 147 for (int y = 0; y < bm.height(); ++y) { in assert_ifDrawnTo() 148 for (int x = 0; x < bm.width(); ++x) { in assert_ifDrawnTo() 150 if (SK_ColorTRANSPARENT == *bm.getAddr32(x, y)) { in assert_ifDrawnTo() 156 if (SK_ColorTRANSPARENT != *bm.getAddr32(x, y)) { in assert_ifDrawnTo() 183 SkBitmap bm; in test_wacky_bitmapshader() local 184 if (bm.tryAllocN32Pixels(width, height)) { in test_wacky_bitmapshader() [all …]
|
D | CodexTest.cpp | 19 static void md5(const SkBitmap& bm, SkMD5::Digest* digest) { in md5() argument 20 SkAutoLockPixels autoLockPixels(bm); in md5() 21 SkASSERT(bm.getPixels()); in md5() 23 size_t rowLen = bm.info().bytesPerPixel() * bm.width(); in md5() 24 for (int y = 0; y < bm.height(); ++y) { in md5() 25 md5.update(static_cast<uint8_t*>(bm.getAddr(0, y)), rowLen); in md5() 51 SkBitmap bm; in check() local 52 bm.allocPixels(info); in check() 53 SkAutoLockPixels autoLockPixels(bm); in check() 55 codec->getPixels(info, bm.getPixels(), bm.rowBytes(), NULL, NULL, NULL); in check() [all …]
|
/external/valgrind/drd/ |
D | drd_bitmap.h | 344 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 …]
|
D | pub_drd_bitmap.h | 81 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 …]
|
D | drd_bitmap.c | 71 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/trace-viewer/third_party/Paste/tests/test_util/ |
D | test_mimeparse.py | 182 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/src/pdf/ |
D | SkPDFBitmap.cpp | 60 static void get_neighbor_avg_color(const SkBitmap& bm, in get_neighbor_avg_color() argument 64 SkASSERT(kN32_SkColorType == bm.colorType()); in get_neighbor_avg_color() 68 int ymax = SkTMin(yOrig + 1, bm.height() - 1); in get_neighbor_avg_color() 70 int xmax = SkTMin(xOrig + 1, bm.width() - 1); in get_neighbor_avg_color() 72 SkPMColor* scanline = bm.getAddr32(0, y); in get_neighbor_avg_color() 90 static size_t pixel_count(const SkBitmap& bm) { in pixel_count() argument 91 return SkToSizeT(bm.width()) * SkToSizeT(bm.height()); in pixel_count() 129 const SkBitmap& bm = not4444(bitmap, ©); in bitmap_to_pdf_pixels() local 130 SkAutoLockPixels autoLockPixels(bm); in bitmap_to_pdf_pixels() 131 switch (bm.colorType()) { in bitmap_to_pdf_pixels() [all …]
|
/external/skia/src/images/ |
D | SkImageDecoder_libgif.cpp | 27 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 …]
|
D | SkImageEncoder.cpp | 15 bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, in encodeStream() argument 18 return this->onEncode(stream, bm, quality); in encodeStream() 21 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, in encodeFile() argument 25 return this->onEncode(&stream, bm, quality); in encodeFile() 28 SkData* SkImageEncoder::encodeData(const SkBitmap& bm, int quality) { in encodeData() argument 31 if (this->onEncode(&stream, bm, quality)) { in encodeData() 37 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap& bm, Type t, in EncodeFile() argument 40 return enc.get() && enc.get()->encodeFile(file, bm, quality); in EncodeFile() 43 bool SkImageEncoder::EncodeStream(SkWStream* stream, const SkBitmap& bm, Type t, in EncodeStream() argument 46 return enc.get() && enc.get()->encodeStream(stream, bm, quality); in EncodeStream() [all …]
|
D | SkMovie_gif.cpp | 131 static void copyInterlaceGroup(SkBitmap* bm, const unsigned char*& src, in copyInterlaceGroup() argument 139 uint32_t* dst = bm->getAddr32(imageDesc.Left, imageDesc.Top + row); in copyInterlaceGroup() 148 static void blitInterlace(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, in blitInterlace() argument 151 int width = bm->width(); in blitInterlace() 152 int height = bm->height(); in blitInterlace() 167 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 0); in blitInterlace() 170 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 4); in blitInterlace() 173 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 4, 2); in blitInterlace() 175 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 2, 1); in blitInterlace() 179 static void blitNormal(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, in blitNormal() argument [all …]
|
/external/skia/gm/ |
D | spritebitmap.cpp | 12 static void make_bm(SkBitmap* bm) { in make_bm() argument 13 bm->allocN32Pixels(100, 100); in make_bm() 14 bm->eraseColor(SK_ColorBLUE); in make_bm() 16 SkCanvas canvas(*bm); in make_bm() 23 static void draw_2_bitmaps(SkCanvas* canvas, const SkBitmap& bm, bool doClip, in draw_2_bitmaps() argument 30 SkIntToScalar(bm.width()), in draw_2_bitmaps() 31 SkIntToScalar(bm.height())); in draw_2_bitmaps() 40 canvas->drawSprite(bm, dx, dy, &paint); in draw_2_bitmaps() 45 canvas->translate(SkIntToScalar(bm.width() + 20), 0); in draw_2_bitmaps() 51 canvas->drawBitmap(bm, SkIntToScalar(dx), SkIntToScalar(dy), &paint); in draw_2_bitmaps() [all …]
|
D | bitmapfilters.cpp | 13 static void make_bm(SkBitmap* bm) { in make_bm() argument 24 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, in make_bm() 29 *bm->getAddr8(0, 0) = 0; in make_bm() 30 *bm->getAddr8(1, 0) = 1; in make_bm() 31 *bm->getAddr8(0, 1) = 2; in make_bm() 32 *bm->getAddr8(1, 1) = 3; in make_bm() 35 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, in draw_bm() argument 37 canvas->drawBitmap(bm, x, y, paint); in draw_bm() 38 return SkIntToScalar(bm.width()) * 5/4; in draw_bm() 41 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, in draw_set() argument [all …]
|
D | emboss.cpp | 15 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()
|
D | bitmaprecttest.cpp | 11 static void make_bm(SkBitmap* bm) { in make_bm() argument 12 bm->allocN32Pixels(60, 60); in make_bm() 13 bm->eraseColor(0); in make_bm() 15 SkCanvas canvas(*bm); in make_bm() 37 SkBitmap bm; in test_bitmaprect() local 38 make_bm(&bm); in test_bitmaprect() 40 canvas->drawBitmap(bm, 150, 45, NULL); in test_bitmaprect() 45 canvas->drawBitmapRectToRect(bm, NULL, SkRect::MakeXYWH(100, 100, 128, 128), NULL); in test_bitmaprect() 49 canvas->drawBitmap(bm, -310, 45, NULL); in test_bitmaprect()
|
/external/skia/samplecode/ |
D | SampleFilter.cpp | 25 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 …]
|
D | SampleHairline.cpp | 51 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 …]
|
D | SampleTinyBitmap.cpp | 24 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 …]
|
D | SampleDitherBitmap.cpp | 62 SkBitmap bm; in make_bitmap() local 63 bm.allocPixels(SkImageInfo::Make(256, 32, kIndex_8_SkColorType, kPremul_SkAlphaType), in make_bitmap() 67 bm.lockPixels(); in make_bitmap() 68 for (int y = 0; y < bm.height(); y++) { in make_bitmap() 69 uint8_t* p = bm.getAddr8(0, y); in make_bitmap() 74 bm.unlockPixels(); in make_bitmap() 75 return bm; in make_bitmap() 101 static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { in setBitmapOpaque() argument 102 SkAutoLockPixels alp(*bm); // needed for ctable in setBitmapOpaque() 103 bm->setAlphaType(isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); in setBitmapOpaque() [all …]
|
/external/skia/src/ports/ |
D | SkImageDecoder_CG.cpp | 53 virtual Result onDecode(SkStream* stream, SkBitmap* bm, Mode); 76 static void force_opaque(SkBitmap* bm) { in force_opaque() argument 77 SkAutoLockPixels alp(*bm); in force_opaque() 78 if (!bm->getPixels()) { in force_opaque() 83 switch (bm->colorType()) { in force_opaque() 98 char* row = (char*)bm->getPixels(); in force_opaque() 99 for (int y = 0; y < bm->height(); ++y) { in force_opaque() 100 proc(row, bm->width()); in force_opaque() 101 row += bm->rowBytes(); in force_opaque() 103 bm->setAlphaType(kOpaque_SkAlphaType); in force_opaque() [all …]
|