/external/chromium_org/third_party/skia/samplecode/ |
SampleBlur.cpp | 23 SkBitmap bm; local 26 bm.allocPixels(SkImageInfo::Make(256, 256, kIndex_8_SkColorType, 31 bm.lockPixels(); 32 const float cx = bm.width() * 0.5f; 33 const float cy = bm.height() * 0.5f; 34 for (int y = 0; y < bm.height(); y++) { 37 uint8_t* p = bm.getAddr8(0, y); 49 bm.unlockPixels(); 50 return bm;
|
SampleDither.cpp | 72 static void make_bm(SkBitmap* bm) { 73 bm->allocN32Pixels(100, 100); 74 bm->eraseColor(SK_ColorTRANSPARENT); 76 SkCanvas c(*bm); 77 draw_sweep(&c, bm->width(), bm->height(), 0); 80 static void pre_dither(const SkBitmap& bm) { 81 SkAutoLockPixels alp(bm); 83 for (int y = 0; y < bm.height(); y++) { 86 SkPMColor* p = bm.getAddr32(0, y) [all...] |
/external/chromium_org/third_party/skia/src/core/ |
SkBitmapProcShader.cpp | 20 bool SkBitmapProcShader::CanDo(const SkBitmap& bm, TileMode tx, TileMode ty) { 21 switch (bm.colorType()) { 70 SkBitmap bm; local 71 if (!buffer.readBitmap(&bm)) { 74 bm.setImmutable(); 77 return SkShader::CreateBitmapShader(bm, mx, my, &lm); 96 static bool valid_for_drawing(const SkBitmap& bm) { 97 if (0 == bm.width() || 0 == bm.height()) { 100 if (NULL == bm.pixelRef()) [all...] |
/external/chromium_org/third_party/skia/tests/ |
BlitRowTest.cpp | 63 static Proc find_proc(const SkBitmap& bm, SkPMColor expect32, uint16_t expect16, 65 switch (bm.colorType()) { 82 static bool check_color(const SkBitmap& bm, SkPMColor expect32, 86 Proc proc = find_proc(bm, expect32, expect16, expect8, &expect); 87 for (int y = 0; y < bm.height(); y++) { 89 int x = proc(bm.getAddr(0, y), bm.width(), expect, &bad); 92 gColorTypeName[bm.colorType()], x, y, expect, bad); 162 Mesh(const SkBitmap& bm, SkPaint* paint) { 163 const SkScalar w = SkIntToScalar(bm.width()) [all...] |
ImageDecodingTest.cpp | 175 SkBitmap bm; local 186 bool success = decoder->decode(&stream, &bm, kN32_SkColorType, 197 const SkAlphaType boundsAlphaType = bm.alphaType(); 206 success = decoder->decode(&stream, &bm, kN32_SkColorType, SkImageDecoder::kDecodePixels_Mode); 230 REPORTER_ASSERT(reporter, bm.alphaType() == boundsAlphaType 231 || bm.alphaType() == kOpaque_SkAlphaType); 270 SkBitmap bm; local 288 bool success = decoder->decode(&stream, &bm, kN32_SkColorType, 295 REPORTER_ASSERT(reporter, bm.width() == 1 && bm.height() == 1) 329 SkBitmap bm; local 383 SkBitmap bm; local 456 SkBitmap bm; local 510 SkBitmap bm; local 579 SkBitmap bm; local 766 SkASSERT(bm); variable [all...] |
AnnotationTest.cpp | 28 SkBitmap bm; local 29 bm.allocN32Pixels(10, 10); 30 bm.eraseColor(SK_ColorTRANSPARENT); 32 SkCanvas canvas(bm); 37 REPORTER_ASSERT(reporter, 0 == *bm.getAddr32(0, 0)); 39 REPORTER_ASSERT(reporter, 0 == *bm.getAddr32(0, 0));
|
PictureTest.cpp | 41 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { 42 bm->allocN32Pixels(w, h); 43 bm->eraseColor(color); 45 bm->setImmutable(); 49 static void make_checkerboard(SkBitmap* bm, int w, int h, bool immutable) { 52 bm->allocPixels(SkImageInfo::Make(w, h, kAlpha_8_SkColorType, 54 SkAutoLockPixels lock(*bm); 56 uint8_t* s = bm->getAddr8(0, y); 61 s = bm->getAddr8(0, y + 1); 68 bm->setImmutable() 484 SkBitmap bm[2*N]; local 626 SkBitmap bm[2*N]; local 1236 SkBitmap bm; local 1300 SkBitmap bm; local 1435 SkBitmap bm; local 1489 SkBitmap bm; local 1708 SkBitmap bm; local [all...] |
SkResourceCacheTest.cpp | 106 SkBitmap bm; local 111 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 114 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 117 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 121 REPORTER_ASSERT(reporter, SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 140 SkBitmap bm; local 145 REPORTER_ASSERT(reporter, SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 148 REPORTER_ASSERT(reporter, SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)); 149 bm.unlockPixels(); 158 REPORTER_ASSERT(reporter, !SkBitmapCache::Find(cachedBitmap.getGenerationID(), rect, &bm, cache)) [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
Patterns.java | 34 Bitmap bm = Bitmap.createBitmap(40, 40, Bitmap.Config.RGB_565); local 35 Canvas c = new Canvas(bm); 40 return bm; 44 Bitmap bm = Bitmap.createBitmap(64, 64, Bitmap.Config.ARGB_8888); local 45 Canvas c = new Canvas(bm); 50 return bm;
|
/external/chromium_org/third_party/skia/src/images/ |
SkImageDecoder_libbmp.cpp | 27 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode) SK_OVERRIDE; 95 bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { 135 bm->setInfo(SkImageInfo::Make(sampler.scaledWidth(), sampler.scaledHeight(), 142 if (!this->allocPixelRef(bm, NULL)) { 146 SkAutoLockPixels alp(*bm); 148 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, *this)) {
|
SkImageDecoder.cpp | 159 bool SkImageDecoder::decode(SkStream* stream, SkBitmap* bm, SkColorType pref, Mode mode) { 171 bm->swap(tmp); 175 bool SkImageDecoder::decodeSubset(SkBitmap* bm, const SkIRect& rect, SkColorType pref) { 181 return this->onDecodeSubset(bm, rect); 240 bool SkImageDecoder::DecodeFile(const char file[], SkBitmap* bm, SkColorType pref, Mode mode, 243 SkASSERT(bm); 247 if (SkImageDecoder::DecodeStream(stream, bm, pref, mode, format)) { 248 bm->pixelRef()->setURI(file); 255 bool SkImageDecoder::DecodeMemory(const void* buffer, size_t size, SkBitmap* bm, SkColorType pref, 263 return SkImageDecoder::DecodeStream(&stream, bm, pref, mode, format) [all...] |
SkImageDecoder_libico.cpp | 23 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 47 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 50 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors); 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); 75 bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) 173 if(otherDecoder->decode(&subStream, bm, this->getDefaultPref(), mode)) { 187 SkBitmap* bm, int alphaByte, int m, int shift, SkPMColor* colors) = NULL; 259 bm->setInfo(SkImageInfo::MakeN32Premul(w, h), calculateRowBytesFor8888(w, bitCount)) [all...] |
SkImageDecoder_ktx.cpp | 44 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 50 bool SkKTXImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { 116 bm->setInfo(SkImageInfo::MakeA8(w, h)); 120 bm->setInfo(SkImageInfo::MakeN32(w, h, alphaType)); 128 if (!this->allocPixelRef(bm, NULL)) { 133 SkAutoLockPixels alp(*bm); 136 if (!sampler.begin(bm, SkScaledBitmapSampler::kGray, *this)) { 165 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, *this)) { 196 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, *this)) { 220 SkASSERT(bm->alphaType() == kPremul_SkAlphaType) [all...] |
SkImageDecoder_libjpeg.cpp | 241 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 328 const SkBitmap& bm, const char caller[]) { 333 cinfo.err->msg_code, buffer, caller, bm.width(), bm.height()); 532 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { 548 return return_false(cinfo, *bm, "setjmp"); 556 return return_false(cinfo, *bm, "read_header"); 583 return bm->setInfo(SkImageInfo::Make(cinfo.image_width, cinfo.image_height, 608 return bm->setInfo(SkImageInfo::Make(smpl.scaledWidth(), smpl.scaledHeight(), 611 return return_false(cinfo, *bm, "start_decompress") [all...] |
/external/chromium_org/third_party/skia/bench/ |
DecodeBench.cpp | 38 SkBitmap bm; local 39 SkImageDecoder::DecodeFile(FLAGS_decodeBenchFilename[0], &bm, fPrefColorType,
|
BitmapBench.cpp | 107 SkBitmap bm; local 110 bm.allocPixels(SkImageInfo::MakeN32(W, H, fAlphaType)); 112 bm.allocPixels(SkImageInfo::Make(W, H, fColorType, fAlphaType)); 114 bm.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorBLACK : 0); 116 onDrawIntoBitmap(bm); 119 convertToIndex666(bm, &fBitmap, fAlphaType); 121 fBitmap = bm; 149 virtual void onDrawIntoBitmap(const SkBitmap& bm) { 150 const int w = bm.width(); 151 const int h = bm.height() [all...] |
/external/chromium_org/third_party/skia/gm/ |
colormatrix.cpp | 65 SkBitmap bm; local 66 bm.allocN32Pixels(width, height); 67 SkCanvas canvas(bm); 77 return bm; 82 SkBitmap bm; local 83 bm.allocN32Pixels(width, height); 84 SkCanvas canvas(bm); 93 return bm;
|
aaclip.cpp | 116 static SkCanvas* make_canvas(const SkBitmap& bm) { 117 const SkImageInfo& info = bm.info(); 120 (SkPMColor*)bm.getPixels(), 121 bm.rowBytes()); 123 return SkNEW_ARGS(SkCanvas, (bm)); 129 SkBitmap bm; local 130 bm.allocPixels(info); 132 SkAutoTUnref<SkCanvas> newc(make_canvas(bm)); 134 bm.eraseColor(SK_ColorGREEN); 136 bm.eraseColor(0) [all...] |
astcbitmap.cpp | 78 SkBitmap bm; variable 81 fileData, SkDecodingImageGenerator::Options()), &bm)) { 88 canvas->drawBitmap(bm, bmX, bmY);
|
ninepatchstretch.cpp | 56 SkBitmap bm; local 58 make_bitmap(&bm, ¢er); 60 // amount of bm that should not be stretched (unless we have to) 61 const SkScalar fixed = SkIntToScalar(bm.width() - center.width()); 70 canvas->drawBitmap(bm, SkIntToScalar(10), SkIntToScalar(10), NULL); 83 canvas->drawBitmapNine(bm, center, r, &paint);
|
/development/apps/SdkSetup/src/com/android/sdksetup/ |
DefaultActivity.java | 52 IBackupManager bm = IBackupManager.Stub.asInterface( local 54 if (bm != null) { 56 bm.setBackupProvisioned(true);
|
/external/chromium_org/third_party/skia/include/core/ |
SkImageEncoder.h | 41 * Encode bitmap 'bm', returning the results in an SkData, at quality level 49 * Encode bitmap 'bm' in the desired format, writing results to 53 bool encodeFile(const char file[], const SkBitmap& bm, int quality); 56 * Encode bitmap 'bm' in the desired format, writing results to 60 bool encodeStream(SkWStream* stream, const SkBitmap& bm, int quality); 70 * Encode bitmap 'bm' in the desired format, writing results to 76 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) = 0;
|
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/util/ |
u_format_rgb9e5.h | 105 int rm, gm, bm; local 132 bm = (int) floor(bc / denom + 0.5); 136 assert(bm <= MAX_RGB9E5_MANTISSA); 139 assert(bm >= 0); 143 retval.field.b = bm;
|
/external/mesa3d/src/gallium/auxiliary/util/ |
u_format_rgb9e5.h | 105 int rm, gm, bm; local 132 bm = (int) floor(bc / denom + 0.5); 136 assert(bm <= MAX_RGB9E5_MANTISSA); 139 assert(bm >= 0); 143 retval.field.b = bm;
|
/external/chromium_org/third_party/skia/experimental/PdfViewer/ |
chop_transparency_main.cpp | 44 static SkISize opaqueSize(const SkBitmap& bm) { 47 for (int y = 0 ; y < bm.height(); y++) { 48 for (int x = 0 ; x < bm.width(); x++) { 49 SkColor color = bm.getColor(x, y); 65 static bool write_bitmap(const char outName[], const SkBitmap& bm) { 66 SkISize size = opaqueSize(bm); 72 SkColor color = bm.getColor(x, y);
|