/external/skia/src/core/ |
D | SkBitmapSampler.cpp | 35 SkBitmapSampler::SkBitmapSampler(const SkBitmap& bm, bool filter, in SkBitmapSampler() argument 37 : fBitmap(bm), fFilterBitmap(filter), fTileModeX(tmx), fTileModeY(tmy) in SkBitmapSampler() 39 SkASSERT(bm.width() > 0 && bm.height() > 0); in SkBitmapSampler() 41 fMaxX = SkToU16(bm.width() - 1); in SkBitmapSampler() 42 fMaxY = SkToU16(bm.height() - 1); in SkBitmapSampler() 54 SkNullBitmapSampler(const SkBitmap& bm, bool filter, in SkNullBitmapSampler() argument 56 : SkBitmapSampler(bm, filter, tmx, tmy) {} in SkNullBitmapSampler() 86 ARGB32_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) in ARGB32_Bilinear_Sampler() argument 87 : SkBitmapSampler(bm, true, tmx, tmy) in ARGB32_Bilinear_Sampler() 134 RGB16_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) in RGB16_Bilinear_Sampler() argument [all …]
|
D | SkBitmapSamplerTemplate.h | 26 …BITMAP_CLASSNAME_PREFIX(_Point_Sampler)(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::Tile… in BITMAP_CLASSNAME_PREFIX() 27 : SkBitmapSampler(bm, false, tmx, tmy) in BITMAP_CLASSNAME_PREFIX() 42 BITMAP_CLASSNAME_PREFIX(_Point_Clamp_Sampler)(const SkBitmap& bm) in BITMAP_CLASSNAME_PREFIX() 43 : SkBitmapSampler(bm, false, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode) in BITMAP_CLASSNAME_PREFIX() 57 BITMAP_CLASSNAME_PREFIX(_Point_Repeat_Pow2_Sampler)(const SkBitmap& bm) in BITMAP_CLASSNAME_PREFIX() 58 : SkBitmapSampler(bm, false, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode) in BITMAP_CLASSNAME_PREFIX() 72 BITMAP_CLASSNAME_PREFIX(_Point_Repeat_Mod_Sampler)(const SkBitmap& bm) in BITMAP_CLASSNAME_PREFIX() 73 : SkBitmapSampler(bm, false, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode) in BITMAP_CLASSNAME_PREFIX() 87 BITMAP_CLASSNAME_PREFIX(_Point_Mirror_Pow2_Sampler)(const SkBitmap& bm) in BITMAP_CLASSNAME_PREFIX() 88 : SkBitmapSampler(bm, false, SkShader::kMirror_TileMode, SkShader::kMirror_TileMode) in BITMAP_CLASSNAME_PREFIX() [all …]
|
D | SkBitmapProcShader.cpp | 5 bool SkBitmapProcShader::CanDo(const SkBitmap& bm, TileMode tx, TileMode ty) { in CanDo() argument 6 switch (bm.config()) { in CanDo() 211 static bool canUseColorShader(const SkBitmap& bm, SkColor* color) { in canUseColorShader() argument 212 if (1 != bm.width() || 1 != bm.height()) { in canUseColorShader() 216 SkAutoLockPixels alp(bm); in canUseColorShader() 217 if (!bm.readyToDraw()) { in canUseColorShader() 221 switch (bm.config()) { in canUseColorShader() 223 *color = SkUnPreMultiply::PMColorToColor(*bm.getAddr32(0, 0)); in canUseColorShader() 226 *color = SkPixel16ToColor(*bm.getAddr16(0, 0)); in canUseColorShader() 229 *color = SkUnPreMultiply::PMColorToColor(bm.getIndex8Color(0, 0)); in canUseColorShader()
|
/external/openssl/crypto/bio/ |
D | bss_mem.c | 148 BUF_MEM *bm; in mem_read() local 150 bm=(BUF_MEM *)b->ptr; in mem_read() 152 ret=(outl >=0 && (size_t)outl > bm->length)?(int)bm->length:outl; in mem_read() 154 memcpy(out,bm->data,ret); in mem_read() 155 bm->length-=ret; in mem_read() 156 if(b->flags & BIO_FLAGS_MEM_RDONLY) bm->data += ret; in mem_read() 158 memmove(&(bm->data[0]),&(bm->data[ret]),bm->length); in mem_read() 160 } else if (bm->length == 0) in mem_read() 173 BUF_MEM *bm; in mem_write() local 175 bm=(BUF_MEM *)b->ptr; in mem_write() [all …]
|
/external/skia/src/utils/mac/ |
D | SkBitmap_Mac.cpp | 13 static void convertGL32_to_Mac32(uint32_t dst[], const SkBitmap& bm) { in convertGL32_to_Mac32() argument 14 memcpy(dst, bm.getPixels(), bm.getSize()); in convertGL32_to_Mac32() 17 uint32_t* stop = dst + (bm.getSize() >> 2); in convertGL32_to_Mac32() 18 const uint8_t* src = (const uint8_t*)bm.getPixels(); in convertGL32_to_Mac32() 25 static void convert565_to_32(uint32_t dst[], const SkBitmap& bm) { in convert565_to_32() argument 26 for (int y = 0; y < bm.height(); y++) { in convert565_to_32() 27 const uint16_t* src = bm.getAddr16(0, y); in convert565_to_32() 28 const uint16_t* stop = src + bm.width(); in convert565_to_32() 67 static CGImageRef bitmap2imageref(const SkBitmap& bm) { in bitmap2imageref() argument 73 bm.getPixels(), in bitmap2imageref() [all …]
|
D | SkCreateCGImageRef.cpp | 16 static SkBitmap* prepareForImageRef(const SkBitmap& bm, in prepareForImageRef() argument 21 switch (bm.config()) { in prepareForImageRef() 67 bm.copyTo(copy, SkBitmap::kARGB_8888_Config); in prepareForImageRef() 69 copy = new SkBitmap(bm); in prepareForImageRef() 76 CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { in SkCreateCGImageRef() argument 80 SkBitmap* bitmap = prepareForImageRef(bm, &bitsPerComponent, &info); in SkCreateCGImageRef()
|
/external/skia/gm/ |
D | bitmapfilters.cpp | 5 static void make_bm(SkBitmap* bm) { in make_bm() argument 11 bm->setConfig(SkBitmap::kIndex8_Config, 2, 2); in make_bm() 12 bm->allocPixels(ctable); in make_bm() 15 *bm->getAddr8(0, 0) = 0; in make_bm() 16 *bm->getAddr8(1, 0) = 1; in make_bm() 17 *bm->getAddr8(0, 1) = 2; in make_bm() 18 *bm->getAddr8(1, 1) = 3; in make_bm() 21 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, in draw_bm() argument 23 canvas->drawBitmap(bm, x, y, paint); in draw_bm() 24 return SkIntToScalar(bm.width()) * 5/4; in draw_bm() [all …]
|
D | tilemodes.cpp | 17 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) { in makebm() argument 18 bm->setConfig(config, w, h); in makebm() 19 bm->allocPixels(); in makebm() 20 bm->eraseColor(0); in makebm() 22 SkCanvas canvas(*bm); in makebm() 41 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, in setup() argument 43 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); in setup()
|
D | gmmain.cpp | 80 const SkBitmap* bm = ⌖ in compare() local 83 bm = © in compare() 86 force_all_opaque(*bm); in compare() 88 const int w = bm->width(); in compare() 89 const int h = bm->height(); in compare() 96 SkAutoLockPixels bmLock(*bm); in compare() 102 SkPMColor c1 = *bm->getAddr32(x, y); in compare()
|
/external/skia/src/images/ |
D | SkImageDecoder_libgif.cpp | 34 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode); 152 static bool error_return(GifFileType* gif, const SkBitmap& bm, in error_return() argument 156 msg, bm.width(), bm.height(), bm.getPixels(), bm.getColorTable()); in error_return() 161 bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) { in onDecode() argument 164 return error_return(gif, *bm, "DGifOpen"); in onDecode() 181 return error_return(gif, *bm, "DGifGetRecordType"); in onDecode() 187 return error_return(gif, *bm, "IMAGE_DESC_RECORD_TYPE"); in onDecode() 191 return error_return(gif, *bm, "ImageCount < 1"); in onDecode() 199 return error_return(gif, *bm, "chooseFromOneChoice"); in onDecode() 202 bm->setConfig(SkBitmap::kIndex8_Config, width, height); in onDecode() [all …]
|
D | SkImageDecoder_libjpeg.cpp | 84 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode); 188 const SkBitmap& bm, const char msg[]) { in return_false() argument 192 bm.width(), bm.height()); in return_false() 197 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { in onDecode() argument 215 return return_false(cinfo, *bm, "setjmp"); in onDecode() 230 return return_false(cinfo, *bm, "read_header"); in onDecode() 280 bm->setConfig(config, cinfo.image_width, cinfo.image_height); in onDecode() 281 bm->setIsOpaque(true); in onDecode() 303 bm->setConfig(config, smpl.scaledWidth(), smpl.scaledHeight()); in onDecode() 304 bm->setIsOpaque(true); in onDecode() [all …]
|
D | SkImageDecoder_libico.cpp | 32 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode); 53 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 56 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 59 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 62 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 65 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 81 bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) in onDecode() argument 168 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) = NULL; in onDecode() 240 bm->setConfig(SkBitmap::kARGB_8888_Config, w, h, calculateRowBytesFor8888(w, bitCount)); in onDecode() 247 if (!this->allocPixelRef(bm, NULL)) in onDecode() [all …]
|
D | SkImageEncoder.cpp | 24 bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, in encodeStream() argument 27 return this->onEncode(stream, bm, quality); in encodeStream() 30 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, in encodeFile() argument 34 return this->onEncode(&stream, bm, quality); in encodeFile() 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()
|
D | SkImageDecoder.cpp | 155 bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm, in decode() argument 169 bm->swap(tmp); in decode() 173 bool SkImageDecoder::decodeRegion(SkBitmap* bm, SkIRect rect, in decodeRegion() argument 187 bm->swap(tmp); in decodeRegion() 221 bool SkImageDecoder::DecodeFile(const char file[], SkBitmap* bm, in DecodeFile() argument 224 SkASSERT(bm); in DecodeFile() 228 if (SkImageDecoder::DecodeStream(&stream, bm, pref, mode, format)) { in DecodeFile() 229 bm->pixelRef()->setURI(file); in DecodeFile() 236 bool SkImageDecoder::DecodeMemory(const void* buffer, size_t size, SkBitmap* bm, in DecodeMemory() argument 244 return SkImageDecoder::DecodeStream(&stream, bm, pref, mode, format); in DecodeMemory() [all …]
|
D | SkImageDecoder_fpdfemb.cpp | 34 virtual bool onDecode(SkStream* stream, SkBitmap* bm, 38 bool render(FPDFEMB_PAGE page, const FPDFEMB_RECT& bounds, SkBitmap* bm, 125 bool SkFPDFEMBImageDecoder::render(FPDFEMB_PAGE page, const FPDFEMB_RECT& bounds, SkBitmap* bm, in render() argument 131 bm->setConfig(SkBitmap::kARGB_8888_Config, width, height); in render() 137 if (!this->allocPixelRef(bm, NULL)) { in render() 142 bm->eraseColor(0); in render() 147 result = FPDFEMB_CreateDIB(width, height, FPDFDIB_BGRA, bm->getPixels(), in render() 148 bm->rowBytes(), &dib); in render() 157 SkPMColor* dst = bm->getAddr32(0, 0); in render() 159 int n = bm->getSize() >> 2; in render() [all …]
|
D | SkImageDecoder_libbmp.cpp | 34 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode); 83 bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { in onDecode() argument 121 bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight()); in onDecode() 122 bm->setIsOpaque(true); in onDecode() 127 if (!this->allocPixelRef(bm, NULL)) { in onDecode() 131 SkAutoLockPixels alp(*bm); in onDecode() 133 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, getDitherImage())) { in onDecode()
|
/external/skia/bench/ |
D | RepeatTileBench.cpp | 13 static void drawIntoBitmap(const SkBitmap& bm) { in drawIntoBitmap() argument 14 const int w = bm.width(); in drawIntoBitmap() 15 const int h = bm.height(); in drawIntoBitmap() 17 SkCanvas canvas(bm); in drawIntoBitmap() 87 SkBitmap bm; in RepeatTileBench() local 90 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h); in RepeatTileBench() 92 bm.setConfig(c, w, h); in RepeatTileBench() 94 bm.allocPixels(); in RepeatTileBench() 95 bm.eraseColor(0); in RepeatTileBench() 97 drawIntoBitmap(bm); in RepeatTileBench() [all …]
|
D | benchmain.cpp | 25 static void erase(SkBitmap& bm) { in erase() argument 26 if (bm.config() == SkBitmap::kA8_Config) { in erase() 27 bm.eraseColor(0); in erase() 29 bm.eraseColor(SK_ColorWHITE); in erase() 88 const SkBitmap& bm) { in saveFile() argument 90 if (!bm.copyTo(©, SkBitmap::kARGB_8888_Config)) { in saveFile() 94 if (bm.config() == SkBitmap::kA8_Config) { in saveFile() 146 static void compare_pict_to_bitmap(SkPicture* pict, const SkBitmap& bm) { in compare_pict_to_bitmap() argument 149 bm2.setConfig(bm.config(), bm.width(), bm.height()); in compare_pict_to_bitmap() 156 if (!equal(bm, bm2)) { in compare_pict_to_bitmap() [all …]
|
D | BitmapBench.cpp | 17 static void drawIntoBitmap(const SkBitmap& bm) { in drawIntoBitmap() argument 18 const int w = bm.width(); in drawIntoBitmap() 19 const int h = bm.height(); in drawIntoBitmap() 21 SkCanvas canvas(bm); in drawIntoBitmap() 105 SkBitmap bm; in BitmapBench() local 108 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h); in BitmapBench() 110 bm.setConfig(c, w, h); in BitmapBench() 112 bm.allocPixels(); in BitmapBench() 113 bm.eraseColor(isOpaque ? SK_ColorBLACK : 0); in BitmapBench() 115 drawIntoBitmap(bm); in BitmapBench() [all …]
|
/external/skia/tests/ |
D | BlitRowTest.cpp | 60 static Proc find_proc(const SkBitmap& bm, SkPMColor expect32, uint16_t expect16, in find_proc() argument 62 switch (bm.config()) { in find_proc() 79 static bool check_color(const SkBitmap& bm, SkPMColor expect32, in check_color() argument 83 Proc proc = find_proc(bm, expect32, expect16, expect8, &expect); in check_color() 84 for (int y = 0; y < bm.height(); y++) { in check_color() 86 int x = proc(bm.getAddr(0, y), bm.width(), expect, &bad); in check_color() 90 gConfigName[bm.config()], x, y, expect, bad); in check_color() 164 Mesh(const SkBitmap& bm, SkPaint* paint) { in Mesh() 165 const SkScalar w = SkIntToScalar(bm.width()); in Mesh() 166 const SkScalar h = SkIntToScalar(bm.height()); in Mesh() [all …]
|
/external/webkit/WebCore/platform/graphics/skia/ |
D | PatternSkia.cpp | 62 SkBitmap* bm = m_tileImage->nativeImageForCurrentFrame(); in platformPattern() local 64 if (!bm) in platformPattern() 68 …m_pattern = SkShader::CreateBitmapShader(*bm, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMo… in platformPattern() 86 bm2.setConfig(bm->config(), bm->width() + expandW, bm->height() + expandH); in platformPattern() 90 canvas.drawBitmap(*bm, 0, 0); in platformPattern()
|
/external/webkit/WebCore/platform/graphics/android/ |
D | ImageSourceAndroid.cpp | 108 static bool shouldReencodeAsRLE(const SkBitmap& bm) { in shouldReencodeAsRLE() argument 109 const SkBitmap::Config c = bm.config(); in shouldReencodeAsRLE() 112 bm.width() >= 64 // narrower than this won't compress well in RLE in shouldReencodeAsRLE() 114 bm.getSize() > MIN_RLE_ALLOC_SIZE; in shouldReencodeAsRLE() 121 PrivateAndroidImageSourceRec(const SkBitmap& bm, int origWidth, in PrivateAndroidImageSourceRec() argument 123 : SkBitmapRef(bm), fSampleSize(sampleSize), fAllDataReceived(false) { in PrivateAndroidImageSourceRec() 175 static SkPixelRef* convertToRLE(SkBitmap* bm, const void* data, size_t len) { in convertToRLE() argument 176 if (!shouldReencodeAsRLE(*bm)) { in convertToRLE() 196 bm->setConfig(SkBitmap::kRLE_Index8_Config, tmp.width(), tmp.height()); in convertToRLE() 317 SkBitmap* bm = &decoder->bitmap(); in setData() local [all …]
|
D | ImageAndroid.cpp | 124 const SkBitmap& bm = ref->bitmap(); in checkForSolidColor() local 125 if (bm.width() != 1 || bm.height() != 1) { in checkForSolidColor() 129 SkAutoLockPixels alp(bm); in checkForSolidColor() 130 if (!bm.readyToDraw()) { in checkForSolidColor() 135 switch (bm.getConfig()) { in checkForSolidColor() 137 color = *bm.getAddr32(0, 0); in checkForSolidColor() 140 color = SkPixel16ToPixel32(*bm.getAddr16(0, 0)); in checkForSolidColor() 143 SkColorTable* ctable = bm.getColorTable(); in checkForSolidColor() 147 color = (*ctable)[*bm.getAddr8(0, 0)]; in checkForSolidColor() 359 SkBitmap bm; in loadPlatformResource() local [all …]
|
/external/iptables/extensions/ |
D | libipt_NETMAP.c | 35 u_int32_t netmask, bm; in bits2netmask() local 39 for (netmask = 0, bm = 0x80000000; bits; bits--, bm >>= 1) in bits2netmask() 40 netmask |= bm; in bits2netmask() 47 u_int32_t bm; in netmask2bits() local 51 for (bits = 0, bm = 0x80000000; netmask & bm; netmask <<= 1) in netmask2bits()
|
/external/skia/src/gl/ |
D | SkTextureCache.h | 31 Key(const SkBitmap& bm) { in Key() argument 32 fGenID = bm.getGenerationID(); in Key() 33 fOffset = bm.pixelRefOffset(); in Key() 34 fWH = (bm.width() << 16) | bm.height(); in Key()
|