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

Unified Diff: samplecode/SampleDash.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 | « samplecode/SampleColorFilter.cpp ('k') | samplecode/SampleDither.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleDash.cpp
diff --git a/samplecode/SampleDash.cpp b/samplecode/SampleDash.cpp
index 20e28969c8044652379dd7eea327db2e05474ced..26d36942dfadced7b2aa952e8b35f2b66039f8d9 100644
--- a/samplecode/SampleDash.cpp
+++ b/samplecode/SampleDash.cpp
@@ -17,8 +17,7 @@ static void setBitmapDash(SkPaint* paint, int width) {
SkColor c = paint->getColor();
SkBitmap bm;
- bm.setConfig(SkBitmap::kARGB_8888_Config, 2, 1);
- bm.allocPixels();
+ bm.allocN32Pixels(2, 1);
bm.lockPixels();
*bm.getAddr32(0, 0) = SkPreMultiplyARGB(0xFF, SkColorGetR(c),
SkColorGetG(c), SkColorGetB(c));
« no previous file with comments | « samplecode/SampleColorFilter.cpp ('k') | samplecode/SampleDither.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698