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

Unified Diff: samplecode/SampleAAClip.cpp

Issue 169063002: use SkColorType instead of SkBitmap::Config in samplecode (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « no previous file | samplecode/SampleAARectModes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAAClip.cpp
diff --git a/samplecode/SampleAAClip.cpp b/samplecode/SampleAAClip.cpp
index d4e632d7af6f7b1bf288bfc22e933b4d54a27b39..5419f68ed19c4d5aa04eefc804e381a27bfdcc4c 100644
--- a/samplecode/SampleAAClip.cpp
+++ b/samplecode/SampleAAClip.cpp
@@ -46,9 +46,9 @@ static void drawClip(SkCanvas* canvas, const SkAAClip& clip) {
clip.copyToMask(&mask);
SkAutoMaskFreeImage amfi(mask.fImage);
- bm.setConfig(SkBitmap::kA8_Config, mask.fBounds.width(),
- mask.fBounds.height(), mask.fRowBytes);
- bm.setPixels(mask.fImage);
+ bm.installPixels(SkImageInfo::MakeA8(mask.fBounds.width(),
+ mask.fBounds.height()),
+ mask.fImage, mask.fRowBytes, NULL, NULL);
SkPaint paint;
canvas->drawBitmap(bm,
« no previous file with comments | « no previous file | samplecode/SampleAARectModes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698