/external/chromium_org/third_party/skia/samplecode/ |
H A D | 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) { argument 103 SkAutoLockPixels alp(*bm); // needed for ctable 104 bm 107 draw2(SkCanvas* canvas, const SkBitmap& bm) argument [all...] |
H A D | 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,
|
H A D | 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;
|
H A D | SampleRepeatTile.cpp | 14 static void make_bitmap(SkBitmap* bm) { argument 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);
|
/external/skia/samplecode/ |
H A D | 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) { argument 103 SkAutoLockPixels alp(*bm); // needed for ctable 104 bm 107 draw2(SkCanvas* canvas, const SkBitmap& bm) argument [all...] |
H A D | 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,
|
H A D | 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;
|
H A D | SampleRepeatTile.cpp | 14 static void make_bitmap(SkBitmap* bm) { argument 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);
|
/external/chromium_org/third_party/skia/bench/ |
H A D | TileBench.cpp | 15 static void create_gradient(SkBitmap* bm) { argument 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, xTil [all...] |
/external/chromium_org/third_party/skia/src/ports/ |
H A D | SkImageDecoder_CG.cpp | 51 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode); 74 static void force_opaque(SkBitmap* bm) { argument 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 106 onDecode(SkStream* stream, SkBitmap* bm, Mode mode) argument 234 onEncode(SkWStream* stream, const SkBitmap& bm, int quality) argument [all...] |
/external/chromium_org/third_party/skia/gm/ |
H A D | verylargebitmap.cpp | 13 static void make_bm(SkBitmap* bm, int width, int height, SkColor colors[2]) { argument 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);
|
H A D | bitmapshader.cpp | 16 static void draw_bm(SkBitmap* bm) { argument 20 bm->allocN32Pixels(20, 20); 21 bm->eraseColor(SK_ColorRED); 23 SkCanvas canvas(*bm); 27 static void draw_mask(SkBitmap* bm) { argument 31 bm->allocPixels(SkImageInfo::MakeA8(20, 20)); 32 bm->eraseColor(SK_ColorTRANSPARENT); 34 SkCanvas canvas(*bm);
|
H A D | filterindiabox.cpp | 19 static SkSize computeSize(const SkBitmap& bm, const SkMatrix& mat) { argument 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) { argument 31 canvas->drawBitmapMatrix(bm, mat, &paint); 35 canvas->drawBitmapMatrix(bm, mat, &paint); 39 canvas->drawBitmapMatrix(bm, mat, &paint); 43 canvas->drawBitmapMatrix(bm, mat, &paint);
|
/external/skia/gm/ |
H A D | verylargebitmap.cpp | 13 static void make_bm(SkBitmap* bm, int width, int height, SkColor colors[2]) { argument 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);
|
H A D | bitmapshader.cpp | 16 static void draw_bm(SkBitmap* bm) { argument 20 bm->allocN32Pixels(20, 20); 21 bm->eraseColor(SK_ColorRED); 23 SkCanvas canvas(*bm); 27 static void draw_mask(SkBitmap* bm) { argument 31 bm->allocPixels(SkImageInfo::MakeA8(20, 20)); 32 bm->eraseColor(SK_ColorTRANSPARENT); 34 SkCanvas canvas(*bm);
|
/external/chromium_org/third_party/skia/tests/ |
H A D | 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);
|
H A D | 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 151 assert_ifDrawnTo(skiatest::Reporter* reporter, const SkBitmap& bm, bool shouldBeDrawn) argument 254 SkBitmap bm; local 274 check_for_all_zeros(const SkBitmap& bm) argument 292 create(SkBitmap* bm, SkColor color) argument [all...] |
/external/skia/src/ports/ |
H A D | SkImageDecoder_CG.cpp | 50 virtual Result onDecode(SkStream* stream, SkBitmap* bm, Mode); 55 SkImageDecoder::Result SkImageDecoder_CG::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { argument 72 bm->setInfo(SkImageInfo::MakeN32Premul(width, height)); 77 if (!this->allocPixelRef(bm, NULL)) { 81 SkAutoLockPixels alp(*bm); 83 if (!SkCopyPixelsFromCGImage(bm->info(), bm->rowBytes(), bm->getPixels(), image)) { 92 SkASSERT(SkBitmap::ComputeIsOpaque(*bm)); 93 bm 181 onEncode(SkWStream* stream, const SkBitmap& bm, int quality) argument [all...] |
/external/skia/tests/ |
H A D | 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);
|
H A D | PictureTest.cpp | 43 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) { argument 44 bm->allocN32Pixels(w, h); 45 bm->eraseColor(color); 47 bm->setImmutable(); 51 static void make_checkerboard(SkBitmap* bm, int w, int h, bool immutable) { argument 54 bm->allocPixels(SkImageInfo::Make(w, h, kAlpha_8_SkColorType, 56 SkAutoLockPixels lock(*bm); 58 uint8_t* s = bm->getAddr8(0, y); 63 s = bm->getAddr8(0, y + 1); 70 bm 74 init_paint(SkPaint* paint, const SkBitmap &bm) argument 85 drawpaint_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 95 drawpoints_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 114 drawrect_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 127 drawoval_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 140 drawrrect_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 155 drawpath_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 171 drawbitmap_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 178 drawbitmap_withshader_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 190 drawsprite_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 222 drawbitmaprect_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 232 drawbitmaprect_withshader_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 249 drawtext_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 260 drawpostext_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 272 drawtextonpath_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 288 drawverts_proc(SkCanvas* canvas, const SkBitmap& bm, const SkBitmap& altBM, const SkPoint& pos, SkTDArray<SkPixelRef*>* usedPixRefs) argument 312 record_bitmaps(const SkBitmap bm[], const SkPoint pos[], SkTDArray<SkPixelRef*> analytic[], int count, DrawBitmapProc proc) argument 372 gather_from_image(const SkBitmap& bm, SkPixelRef* const refs[], int count, SkTDArray<SkPixelRef*>* array, const SkRect& subset) argument 458 create_textures(SkBitmap* bm, SkPixelRef** refs, int num, int w, int h) argument 486 SkBitmap bm[2*N]; local 591 SkBitmap bm[2*N]; local 1004 SkBitmap bm; local 1068 SkBitmap bm; local 1203 SkBitmap bm; local 1215 encode_bitmap_to_data(size_t*, const SkBitmap& bm) argument 1256 SkBitmap bm; local 1498 SkBitmap bm; local [all...] |
H A D | DrawBitmapRectTest.cpp | 44 SkBitmap bm; local 45 bool installSuccess = SkInstallDiscardablePixelRef(SkNEW(FailureImageGenerator), &bm, pool); 63 canvas->drawBitmap(bm, 0, 0, &paint); 155 const SkBitmap& bm, bool shouldBeDrawn) { 156 for (int y = 0; y < bm.height(); ++y) { 157 for (int x = 0; x < bm.width(); ++x) { 159 if (SK_ColorTRANSPARENT == *bm.getAddr32(x, y)) { 165 if (SK_ColorTRANSPARENT != *bm.getAddr32(x, y)) { 192 SkBitmap bm; local 193 bm 154 assert_ifDrawnTo(skiatest::Reporter* reporter, const SkBitmap& bm, bool shouldBeDrawn) argument 255 SkBitmap bm; local 275 check_for_all_zeros(const SkBitmap& bm) argument 293 create(SkBitmap* bm, SkColor color) argument [all...] |
/external/chromium_org/third_party/skia/include/utils/mac/ |
H A D | SkCGUtils.h | 46 SK_API CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm, 53 static inline CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { argument 54 return SkCreateCGImageRefWithColorspace(bm, NULL);
|
/external/skia/include/utils/mac/ |
H A D | SkCGUtils.h | 46 SK_API CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm, 53 static inline CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { argument 54 return SkCreateCGImageRefWithColorspace(bm, NULL);
|
/external/chromium_org/third_party/skia/src/images/ |
H A D | SkImageDecoder_pkm.cpp | 27 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; 35 bool SkPKMImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { argument 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)) {
|
H A D | SkMovie_gif.cpp | 127 static void copyInterlaceGroup(SkBitmap* bm, const unsigned char*& src, argument 135 uint32_t* dst = bm->getAddr32(imageDesc.Left, imageDesc.Top + row); 144 static void blitInterlace(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap, argument 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, cons argument 199 fillRect(SkBitmap* bm, GifWord left, GifWord top, GifWord width, GifWord height, uint32_t col) argument 221 drawFrame(SkBitmap* bm, const SavedImage* frame, const ColorMapObject* cmap) argument 301 disposeFrameIfNeeded(SkBitmap* bm, const SavedImage* cur, const SavedImage* next, SkBitmap* backup, SkColor color) argument 339 onGetBitmap(SkBitmap* bm) argument [all...] |