Lines Matching defs:bitmap
76 // CreateBitmapShader is too smart for us; an empty (or 1x1) bitmap shader
77 // gets optimized into a non-bitmap form, so we create a 2x2 bitmap here.
78 SkBitmap bitmap;
79 bitmap.allocPixels(SkImageInfo::MakeN32Premul(2, 2));
80 bitmap.eraseColor(SK_ColorBLUE);
81 *(bitmap.getAddr32(0, 0)) = SK_ColorGREEN;
82 SkShader* shader = SkShader::CreateBitmapShader(bitmap, SkShader::kClamp_TileMode,
831 // This bitmap has a width and height but no pixels. As a result, attempting to record it will
845 static SkData* serialized_picture_from_bitmap(const SkBitmap& bitmap) {
847 SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(bitmap.width()),
848 SkIntToScalar(bitmap.height()));
849 canvas->drawBitmap(bitmap, 0, 0);
887 // Create a bitmap that will be encoded.
908 // providing a function to decode the bitmap.
921 // bitmap. Drawing this picture should look exactly like the original bitmap.
1216 static void draw_bitmaps(const SkBitmap bitmap, SkCanvas* canvas) {
1222 canvas->drawBitmap(bitmap, 0.0f, 0.0f, &paint);
1223 canvas->drawBitmapRect(bitmap, rect, rect, &paint, SkCanvas::kStrict_SrcRectConstraint);
1224 canvas->drawBitmapNine(bitmap, irect, rect, &paint);
1225 canvas->drawBitmap(bitmap, 1, 1); // drawSprite
1262 // When the bug is present, the red square (the second bitmap)