Searched refs:bm (Results 1 - 25 of 70) sorted by relevance

123

/external/skia/src/images/
H A DSkImageEncoder.cpp24 bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, argument
27 return this->onEncode(stream, bm, quality);
30 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, argument
34 return this->onEncode(&stream, bm, quality);
37 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap& bm, Type t, argument
40 return enc.get() && enc.get()->encodeFile(file, bm, quality);
43 bool SkImageEncoder::EncodeStream(SkWStream* stream, const SkBitmap& bm, Type t, argument
46 return enc.get() && enc.get()->encodeStream(stream, bm, quality);
H A DSkImageDecoder_libgif.cpp34 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode);
147 static bool error_return(GifFileType* gif, const SkBitmap& bm, argument
151 msg, bm.width(), bm.height(), bm.getPixels(), bm.getColorTable());
156 bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) { argument
159 return error_return(gif, *bm, "DGifOpen");
176 return error_return(gif, *bm, "DGifGetRecordType");
182 return error_return(gif, *bm, "IMAGE_DESC_RECORD_TYP
[all...]
H A DSkImageDecoder_libjpeg.cpp58 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
147 const SkBitmap& bm, const char msg[]) {
151 bm.width(), bm.height());
156 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { argument
174 return return_false(cinfo, *bm, "setjmp");
189 return return_false(cinfo, *bm, "read_header");
238 bm->setConfig(config, cinfo.image_width, cinfo.image_height);
239 bm->setIsOpaque(true);
261 bm
146 return_false(const jpeg_decompress_struct& cinfo, const SkBitmap& bm, const char msg[]) argument
542 ChooseWriter(const SkBitmap& bm) argument
559 onEncode(SkWStream* stream, const SkBitmap& bm, int quality) argument
[all...]
H A DSkImageDecoder.cpp135 bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm, argument
149 bm->swap(tmp);
155 bool SkImageDecoder::DecodeFile(const char file[], SkBitmap* bm, argument
158 SkASSERT(bm);
162 if (SkImageDecoder::DecodeStream(&stream, bm, pref, mode, format)) {
163 bm->pixelRef()->setURI(file);
170 bool SkImageDecoder::DecodeMemory(const void* buffer, size_t size, SkBitmap* bm, argument
178 return SkImageDecoder::DecodeStream(&stream, bm, pref, mode, format);
181 bool SkImageDecoder::DecodeStream(SkStream* stream, SkBitmap* bm, argument
184 SkASSERT(bm);
[all...]
H A DSkImageDecoder_libbmp.cpp34 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode);
83 bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { argument
121 bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
122 bm->setIsOpaque(true);
127 if (!this->allocPixelRef(bm, NULL)) {
131 SkAutoLockPixels alp(*bm);
133 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, getDitherImage())) {
H A DSkImageDecoder_libico.cpp32 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) argument
168 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) = NULL;
240 bm->setConfig(SkBitmap::kARGB_8888_Config, w, h, calculateRowBytesFor8888(w, bitCount));
247 if (!this->allocPixelRef(bm, NUL
284 editPixelBit1(const int pixelNo, const unsigned char* buf, const int xorOffset, int& x, int y, const int w, SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) argument
313 editPixelBit4(const int pixelNo, const unsigned char* buf, const int xorOffset, int& x, int y, const int w, SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) argument
333 editPixelBit8(const int pixelNo, const unsigned char* buf, const int xorOffset, int& x, int y, const int w, SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) argument
343 editPixelBit24(const int pixelNo, const unsigned char* buf, const int xorOffset, int& x, int y, const int w, SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) argument
357 editPixelBit32(const int pixelNo, const unsigned char* buf, const int xorOffset, int& x, int y, const int w, SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) argument
[all...]
H A DSkImageDecoder_fpdfemb.cpp34 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, argument
131 bm->setConfig(SkBitmap::kARGB_8888_Config, width, height);
137 if (!this->allocPixelRef(bm, NULL)) {
142 bm->eraseColor(0);
147 result = FPDFEMB_CreateDIB(width, height, FPDFDIB_BGRA, bm->getPixels(),
148 bm->rowBytes(), &dib);
157 SkPMColor* dst = bm->getAddr32(0, 0);
159 int n = bm
173 onDecode(SkStream* stream, SkBitmap* bm, SkBitmap::Config prefConfig, Mode mode) argument
[all...]
/external/skia/gm/
H A Dbitmapfilters.cpp5 static void make_bm(SkBitmap* bm) { argument
11 bm->setConfig(SkBitmap::kIndex8_Config, 2, 2);
12 bm->allocPixels(ctable);
15 *bm->getAddr8(0, 0) = 0;
16 *bm->getAddr8(1, 0) = 1;
17 *bm->getAddr8(0, 1) = 2;
18 *bm->getAddr8(1, 1) = 3;
21 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, argument
23 canvas->drawBitmap(bm, x, y, paint);
24 return SkIntToScalar(bm
27 draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p) argument
46 draw_row(SkCanvas* canvas, const SkBitmap& bm) argument
[all...]
H A Dtilemodes.cpp17 static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) { argument
18 bm->setConfig(config, w, h);
19 bm->allocPixels();
20 bm->eraseColor(0);
22 SkCanvas canvas(*bm);
41 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, argument
43 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
/external/skia/src/utils/mac/
H A DSkBitmap_Mac.cpp13 static void convertGL32_to_Mac32(uint32_t dst[], const SkBitmap& bm) { argument
14 memcpy(dst, bm.getPixels(), bm.getSize());
17 uint32_t* stop = dst + (bm.getSize() >> 2);
18 const uint8_t* src = (const uint8_t*)bm.getPixels();
25 static void convert565_to_32(uint32_t dst[], const SkBitmap& bm) { argument
26 for (int y = 0; y < bm.height(); y++) {
27 const uint16_t* src = bm.getAddr16(0, y);
28 const uint16_t* stop = src + bm.width();
67 static CGImageRef bitmap2imageref(const SkBitmap& bm) { argument
118 SkBitmap bm; local
[all...]
H A DSkCreateCGImageRef.cpp16 static SkBitmap* prepareForImageRef(const SkBitmap& bm, argument
21 switch (bm.config()) {
67 bm.copyTo(copy, SkBitmap::kARGB_8888_Config);
69 copy = new SkBitmap(bm);
76 CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { argument
80 SkBitmap* bitmap = prepareForImageRef(bm, &bitsPerComponent, &info);
/external/openssl/crypto/bio/
H A Dbss_mem.c146 BUF_MEM *bm; local
150 bm=(BUF_MEM *)b->ptr;
152 ret=(outl > bm->length)?bm->length:outl;
154 memcpy(out,bm->data,ret);
155 bm->length-=ret;
156 /* memmove(&(bm->data[0]),&(bm->data[ret]), bm->length); */
157 if(b->flags & BIO_FLAGS_MEM_RDONLY) bm
177 BUF_MEM *bm; local
206 BUF_MEM *bm=(BUF_MEM *)b->ptr; local
283 BUF_MEM *bm=(BUF_MEM *)bp->ptr; local
[all...]
/external/skia/src/core/
H A DSkBitmapSampler.cpp35 SkBitmapSampler::SkBitmapSampler(const SkBitmap& bm, bool filter, argument
37 : fBitmap(bm), fFilterBitmap(filter), fTileModeX(tmx), fTileModeY(tmy)
39 SkASSERT(bm.width() > 0 && bm.height() > 0);
41 fMaxX = SkToU16(bm.width() - 1);
42 fMaxY = SkToU16(bm.height() - 1);
54 SkNullBitmapSampler(const SkBitmap& bm, bool filter, argument
56 : SkBitmapSampler(bm, filter, tmx, tmy) {}
86 ARGB32_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
87 : SkBitmapSampler(bm, tru
134 RGB16_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
188 Index8_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
243 A8_Bilinear_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
298 A8_NoFilter_Sampler(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
325 Create(const SkBitmap& bm, bool doFilter, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
[all...]
H A DSkBitmapSamplerTemplate.h26 BITMAP_CLASSNAME_PREFIX(_Point_Sampler)(const SkBitmap& bm, SkShader::TileMode tmx, SkShader::TileMode tmy) argument
27 : SkBitmapSampler(bm, false, tmx, tmy)
42 BITMAP_CLASSNAME_PREFIX(_Point_Clamp_Sampler)(const SkBitmap& bm) argument
43 : SkBitmapSampler(bm, false, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode)
57 BITMAP_CLASSNAME_PREFIX(_Point_Repeat_Pow2_Sampler)(const SkBitmap& bm) argument
58 : SkBitmapSampler(bm, false, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode)
72 BITMAP_CLASSNAME_PREFIX(_Point_Repeat_Mod_Sampler)(const SkBitmap& bm) argument
73 : SkBitmapSampler(bm, false, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode)
87 BITMAP_CLASSNAME_PREFIX(_Point_Mirror_Pow2_Sampler)(const SkBitmap& bm) argument
88 : SkBitmapSampler(bm, fals
102 _Point_Mirror_Mod_Sampler(const SkBitmap& bm) argument
[all...]
H A DSkBitmapProcShader.cpp5 bool SkBitmapProcShader::CanDo(const SkBitmap& bm, TileMode tx, TileMode ty) { argument
6 switch (bm.config()) {
211 static bool canUseColorShader(const SkBitmap& bm, SkColor* color) { argument
212 if (1 != bm.width() || 1 != bm.height()) {
216 SkAutoLockPixels alp(bm);
217 if (!bm.readyToDraw()) {
221 switch (bm.config()) {
223 *color = SkUnPreMultiply::PMColorToColor(*bm.getAddr32(0, 0));
226 *color = SkPixel16ToColor(*bm
[all...]
/external/webkit/WebCore/platform/graphics/skia/
H A DPatternSkia.cpp62 SkBitmap* bm = m_tileImage->nativeImageForCurrentFrame();
64 if (!bm)
68 m_pattern = SkShader::CreateBitmapShader(*bm, SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode);
86 bm2.setConfig(bm->config(), bm->width() + expandW, bm->height() + expandH);
90 canvas.drawBitmap(*bm, 0, 0);
/external/skia/bench/
H A DRepeatTileBench.cpp13 static void drawIntoBitmap(const SkBitmap& bm) { argument
14 const int w = bm.width();
15 const int h = bm.height();
17 SkCanvas canvas(bm);
87 SkBitmap bm; local
90 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h);
92 bm.setConfig(c, w, h);
94 bm.allocPixels();
95 bm.eraseColor(0);
97 drawIntoBitmap(bm);
[all...]
H A DBitmapBench.cpp17 static void drawIntoBitmap(const SkBitmap& bm) { argument
18 const int w = bm.width();
19 const int h = bm.height();
21 SkCanvas canvas(bm);
105 SkBitmap bm; local
108 bm.setConfig(SkBitmap::kARGB_8888_Config, w, h);
110 bm.setConfig(c, w, h);
112 bm.allocPixels();
113 bm.eraseColor(isOpaque ? SK_ColorBLACK : 0);
115 drawIntoBitmap(bm);
[all...]
H A Dbenchmain.cpp25 static void erase(SkBitmap& bm) { argument
26 if (bm.config() == SkBitmap::kA8_Config) {
27 bm.eraseColor(0);
29 bm.eraseColor(SK_ColorWHITE);
88 const SkBitmap& bm) {
90 if (!bm.copyTo(&copy, SkBitmap::kARGB_8888_Config)) {
94 if (bm.config() == SkBitmap::kA8_Config) {
146 static void compare_pict_to_bitmap(SkPicture* pict, const SkBitmap& bm) { argument
149 bm2.setConfig(bm.config(), bm
87 saveFile(const char name[], const char config[], const char dir[], const SkBitmap& bm) argument
336 SkBitmap bm; local
[all...]
/external/webkit/WebCore/platform/graphics/android/
H A DBitmapAllocatorAndroid.cpp37 static bool should_use_ashmem(const SkBitmap& bm) { argument
38 return bm.getSize() >= MIN_ASHMEM_ALLOC_SIZE;
H A DImageSourceAndroid.cpp108 static bool shouldReencodeAsRLE(const SkBitmap& bm) { argument
109 const SkBitmap::Config c = bm.config();
112 bm.width() >= 64 // narrower than this won't compress well in RLE
114 bm.getSize() > MIN_RLE_ALLOC_SIZE;
121 PrivateAndroidImageSourceRec(const SkBitmap& bm, int origWidth, argument
123 : SkBitmapRef(bm), fSampleSize(sampleSize), fAllDataReceived(false) {
175 static SkPixelRef* convertToRLE(SkBitmap* bm, const void* data, size_t len) { argument
176 if (!shouldReencodeAsRLE(*bm)) {
196 bm->setConfig(SkBitmap::kRLE_Index8_Config, tmp.width(), tmp.height());
295 SkBitmap* bm local
[all...]
/external/webkit/WebKit/android/plugins/
H A DSkANP.h52 explicit ANPCanvas(const SkBitmap& bm) { argument
53 skcanvas = new SkCanvas(bm);
/external/skia/src/gl/
H A DSkTextureCache.h31 Key(const SkBitmap& bm) { argument
32 fGenID = bm.getGenerationID();
33 fOffset = bm.pixelRefOffset();
34 fWH = (bm.width() << 16) | bm.height();
/external/iptables/extensions/
H A Dlibipt_NETMAP.c35 u_int32_t netmask, bm; local
39 for (netmask = 0, bm = 0x80000000; bits; bits--, bm >>= 1)
40 netmask |= bm;
47 u_int32_t bm; local
51 for (bits = 0, bm = 0x80000000; netmask & bm; netmask <<= 1)
/external/skia/tests/
H A DBlitRowTest.cpp60 static Proc find_proc(const SkBitmap& bm, SkPMColor expect32, uint16_t expect16, argument
62 switch (bm.config()) {
79 static bool check_color(const SkBitmap& bm, SkPMColor expect32, argument
83 Proc proc = find_proc(bm, expect32, expect16, expect8, &expect);
84 for (int y = 0; y < bm.height(); y++) {
86 int x = proc(bm.getAddr(0, y), bm.width(), expect, &bad);
90 gConfigName[bm.config()], x, y, expect, bad);
164 Mesh(const SkBitmap& bm, SkPaint* paint) { argument
165 const SkScalar w = SkIntToScalar(bm
184 save_bm(const SkBitmap& bm, const char name[]) argument
[all...]

Completed in 267 milliseconds

123