/external/chromium_org/third_party/skia/gm/ |
bitmapfilters.cpp | 13 static void make_bm(SkBitmap* bm) { 24 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, 29 *bm->getAddr8(0, 0) = 0; 30 *bm->getAddr8(1, 0) = 1; 31 *bm->getAddr8(0, 1) = 2; 32 *bm->getAddr8(1, 1) = 3; 35 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, 37 canvas->drawBitmap(bm, x, y, paint); 38 return SkIntToScalar(bm.width()) * 5/4; 41 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x [all...] |
verylargebitmap.cpp | 13 static void make_bm(SkBitmap* bm, int width, int height, SkColor colors[2]) { 14 bm->allocN32Pixels(width, height); 15 SkCanvas canvas(*bm); 24 bm->setImmutable(); 28 SkBitmap bm; local 29 make_bm(&bm, width, height, colors); 42 canvas->drawBitmap(bm, 0, 0, NULL); 48 canvas->drawBitmapRect(bm, &ir, r, NULL); 53 canvas->drawBitmapRect(bm, NULL, r, NULL);
|
bitmapshader.cpp | 16 static void draw_bm(SkBitmap* bm) { 20 bm->allocN32Pixels(20, 20); 21 bm->eraseColor(SK_ColorRED); 23 SkCanvas canvas(*bm); 27 static void draw_mask(SkBitmap* bm) { 31 bm->allocPixels(SkImageInfo::MakeA8(20, 20)); 32 bm->eraseColor(SK_ColorTRANSPARENT); 34 SkCanvas canvas(*bm);
|
filterindiabox.cpp | 19 static SkSize computeSize(const SkBitmap& bm, const SkMatrix& mat) { 20 SkRect bounds = SkRect::MakeWH(SkIntToScalar(bm.width()), 21 SkIntToScalar(bm.height())); 26 static void draw_row(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat, SkScalar dx) { 31 canvas->drawBitmapMatrix(bm, mat, &paint); 35 canvas->drawBitmapMatrix(bm, mat, &paint); 39 canvas->drawBitmapMatrix(bm, mat, &paint); 43 canvas->drawBitmapMatrix(bm, mat, &paint);
|
arithmode.cpp | 19 SkBitmap bm; local 20 bm.allocN32Pixels(WW, HH); 21 bm.eraseColor(SK_ColorTRANSPARENT); 22 return bm; 26 SkBitmap bm = make_bm(); local 27 SkCanvas canvas(bm); 38 return bm; 42 SkBitmap bm = make_bm(); local 43 SkCanvas canvas(bm); 53 return bm; [all...] |
drawbitmaprect.cpp | 18 SkBitmap bm; local 19 bm.allocN32Pixels(w, h); 21 for (int y = 0; y < bm.height(); y++) { 22 uint32_t* p = bm.getAddr32(0, y); 23 for (int x = 0; x < bm.width(); x++) { 27 bm.unlockPixels(); 28 return bm; 31 static void makebm(SkBitmap* bm, int w, int h) { 32 bm->allocN32Pixels(w, h); 33 bm->eraseColor(SK_ColorTRANSPARENT) 162 SkBitmap bm; local [all...] |
/external/chromium_org/third_party/skia/samplecode/ |
SampleFilter.cpp | 25 static void make_bm(SkBitmap* bm) { 31 bm->allocPixels(SkImageInfo::Make(2, 2, kIndex_8_SkColorType, 36 *bm->getAddr8(0, 0) = 0; 37 *bm->getAddr8(1, 0) = 1; 38 *bm->getAddr8(0, 1) = 2; 39 *bm->getAddr8(1, 1) = 3; 42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, 44 canvas->drawBitmap(bm, x, y, paint); 45 return SkIntToScalar(bm.width()) * 5/4; 48 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p) [all...] |
SampleHairline.cpp | 34 SkBitmap bm; local 35 bm.allocN32Pixels(800, 600); 37 SkCanvas canvas(bm); 64 static bool check_bitmap_margin(const SkBitmap& bm, int margin) { 65 size_t rb = bm.rowBytes(); 67 if (!check_zeros(bm.getAddr32(0, i), bm.width(), 1)) { 70 int bottom = bm.height() - i - 1; 71 if (!check_zeros(bm.getAddr32(0, bottom), bm.width(), 1)) 227 SkBitmap bm, bm2; local [all...] |
SampleDitherBitmap.cpp | 62 SkBitmap bm; local 63 bm.allocPixels(SkImageInfo::Make(256, 32, kIndex_8_SkColorType, 68 bm.lockPixels(); 69 for (int y = 0; y < bm.height(); y++) { 70 uint8_t* p = bm.getAddr8(0, y); 75 bm.unlockPixels(); 76 return bm; 102 static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) { 103 SkAutoLockPixels alp(*bm); // needed for ctable 104 bm->setAlphaType(isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType) [all...] |
SampleDash.cpp | 19 SkBitmap bm; local 20 bm.allocN32Pixels(2, 1); 21 bm.lockPixels(); 22 *bm.getAddr32(0, 0) = SkPreMultiplyARGB(0xFF, SkColorGetR(c), 24 *bm.getAddr32(1, 0) = 0; 25 bm.unlockPixels(); 30 SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
|
SampleTextureDomain.cpp | 15 SkBitmap bm; local 16 bm.allocN32Pixels(5, 5); 18 for (int y = 0; y < bm.height(); y++) { 19 uint32_t* p = bm.getAddr32(0, y); 20 for (int x = 0; x < bm.width(); x++) { 24 bm.unlockPixels(); 25 return bm;
|
SampleRepeatTile.cpp | 14 static void make_bitmap(SkBitmap* bm) { 17 bm->allocN32Pixels(W, H); 20 SkCanvas canvas(*bm); 37 SkBitmap bm; local 38 make_bitmap(&bm); 40 SkShader* shader = SkShader::CreateBitmapShader(bm, tm, tm);
|
SampleCamera.cpp | 34 SkBitmap bm; local 35 if (SkImageDecoder::DecodeFile(str.c_str(), &bm)) { 36 SkRect src = { 0, 0, SkIntToScalar(bm.width()), SkIntToScalar(bm.height()) }; 41 SkShader* s = SkShader::CreateBitmapShader(bm,
|
/external/chromium_org/third_party/skia/tests/ |
MipMapTest.cpp | 13 static void make_bitmap(SkBitmap* bm, SkRandom& rand) { 18 bm->allocN32Pixels(w, h); 19 bm->eraseColor(SK_ColorWHITE); 23 SkBitmap bm; local 27 make_bitmap(&bm, rand); 28 SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(bm));
|
PipeTest.cpp | 31 SkBitmap bm; local 32 bm.allocN32Pixels(2, 2); 33 bm.eraseColor(SK_ColorTRANSPARENT); 35 SkShader* shader = SkShader::CreateBitmapShader(bm, SkShader::kClamp_TileMode, 41 pipeCanvas->drawBitmap(bm, 0, 0);
|
DrawBitmapRectTest.cpp | 41 SkBitmap bm; local 42 bool installSuccess = SkInstallDiscardablePixelRef(SkNEW(FailureImageGenerator), &bm, pool); 60 canvas->drawBitmap(bm, 0, 0, &paint); 152 const SkBitmap& bm, bool shouldBeDrawn) { 153 for (int y = 0; y < bm.height(); ++y) { 154 for (int x = 0; x < bm.width(); ++x) { 156 if (SK_ColorTRANSPARENT == *bm.getAddr32(x, y)) { 162 if (SK_ColorTRANSPARENT != *bm.getAddr32(x, y)) { 189 SkBitmap bm; local 190 if (bm.tryAllocN32Pixels(width, height)) 254 SkBitmap bm; local [all...] |
BitmapHeapTest.cpp | 35 SkBitmap bm; local 36 bm.allocN32Pixels(2, 2); 37 bm.eraseColor(SK_ColorRED); 38 uint32_t* pixel = bm.getAddr32(1,0); 41 SkShader* bitmapShader = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
|
/external/chromium_org/third_party/skia/bench/ |
TileBench.cpp | 15 static void create_gradient(SkBitmap* bm) { 16 SkASSERT(1 == bm->width()); 17 const int height = bm->height(); 22 SkAutoLockPixels lock(*bm); 24 *bm->getAddr32(0, y) = SkColorSetRGB(0, 0, (U8CPU) blue); 49 SkBitmap bm; local 51 bm.allocN32Pixels(kWidth, kHeight, true); 52 bm.eraseColor(SK_ColorWHITE); 54 create_gradient(&bm); 56 SkShader* s = SkShader::CreateBitmapShader(bm, xTile, yTile) [all...] |
/external/chromium_org/third_party/skia/src/ports/ |
SkImageDecoder_CG.cpp | 51 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode); 74 static void force_opaque(SkBitmap* bm) { 75 SkAutoLockPixels alp(*bm); 76 if (!bm->getPixels()) { 81 switch (bm->colorType()) { 96 char* row = (char*)bm->getPixels(); 97 for (int y = 0; y < bm->height(); ++y) { 98 proc(row, bm->width()); 99 row += bm->rowBytes(); 101 bm->setAlphaType(kOpaque_SkAlphaType) [all...] |
/external/chromium_org/third_party/skia/include/utils/mac/ |
SkCGUtils.h | 46 SK_API CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm, 53 static inline CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { 54 return SkCreateCGImageRefWithColorspace(bm, NULL);
|
/external/chromium_org/third_party/skia/src/images/ |
SkImageDecoder_pkm.cpp | 27 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 35 bool SkPKMImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { 61 bm->setInfo(SkImageInfo::MakeN32(sampler.scaledWidth(), sampler.scaledHeight(), 67 if (!this->allocPixelRef(bm, NULL)) { 72 SkAutoLockPixels alp(*bm); 74 if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, *this)) {
|
SkMovie_gif.cpp | 127 static void copyInterlaceGroup(SkBitmap* bm, const unsigned char*& src, 135 uint32_t* dst = bm->getAddr32(imageDesc.Left, imageDesc.Top + row); 144 static void blitInterlace(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, 147 int width = bm->width(); 148 int height = bm->height(); 163 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 0); 166 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 8, 4); 169 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 4, 2); 171 copyInterlaceGroup(bm, src, cmap, transparent, copyWidth, copyHeight, frame->ImageDesc, 2, 1); 175 static void blitNormal(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap [all...] |
/external/chromium_org/third_party/skia/src/gpu/ |
GrSurface.cpp | 24 SkBitmap bm; local 25 if (!bm.tryAllocPixels(SkImageInfo::MakeN32Premul(this->width(), this->height()))) { 30 bm.getPixels()); 39 if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100)) {
|
/external/chromium_org/third_party/skia/tools/ |
picture_utils.h | 44 * @param bm the bitmap to record 51 bool write_bitmap_to_disk(const SkBitmap& bm, const SkString& dirPath,
|
/external/chromium_org/third_party/skia/src/utils/mac/ |
SkCreateCGImageRef.cpp | 51 static bool getBitmapInfo(const SkBitmap& bm, 59 switch (bm.colorType()) { 76 *info = ComputeCGAlphaInfo_RGBA(bm.alphaType()); 80 *info = ComputeCGAlphaInfo_BGRA(bm.alphaType()); 85 if (bm.isOpaque()) { 97 static SkBitmap* prepareForImageRef(const SkBitmap& bm, 101 if (!getBitmapInfo(bm, bitsPerComponent, info, &upscaleTo32)) { 110 bm.copyTo(copy, kN32_SkColorType); 112 copy = new SkBitmap(bm); 117 CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm, [all...] |