Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: gm/bitmapshader.cpp

Issue 140593005: add legacy/helper allocN32Pixels, and convert gm to use it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/bitmapscroll.cpp ('k') | gm/bitmapsource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/bitmapshader.cpp
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp
index 4fd68ee77f5ab4690f4507cbfe7f9d41a6628c54..d1915c9c90632dabf31671cd92f35b3dff33d5bb 100644
--- a/gm/bitmapshader.cpp
+++ b/gm/bitmapshader.cpp
@@ -17,8 +17,7 @@ static void draw_bm(SkBitmap* bm) {
SkPaint bluePaint;
bluePaint.setColor(SK_ColorBLUE);
- bm->setConfig(SkBitmap::kARGB_8888_Config, 20, 20);
- bm->allocPixels();
+ bm->allocN32Pixels(20, 20);
bm->eraseColor(SK_ColorRED);
SkCanvas canvas(*bm);
@@ -29,8 +28,7 @@ static void draw_mask(SkBitmap* bm) {
SkPaint circlePaint;
circlePaint.setColor(SK_ColorBLACK);
- bm->setConfig(SkBitmap::kA8_Config, 20, 20);
- bm->allocPixels();
+ bm->allocConfigPixels(SkBitmap::kA8_Config, 20, 20);
bm->eraseColor(SK_ColorTRANSPARENT);
SkCanvas canvas(*bm);
« no previous file with comments | « gm/bitmapscroll.cpp ('k') | gm/bitmapsource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698