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

Unified Diff: samplecode/SampleDither.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/SampleDash.cpp ('k') | samplecode/SampleDitherBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleDither.cpp
diff --git a/samplecode/SampleDither.cpp b/samplecode/SampleDither.cpp
index 38d67ad7cf748858506d2d72787395657a4b29b6..57c7613d93dc761febaf67772cc43e5fa453ade5 100644
--- a/samplecode/SampleDither.cpp
+++ b/samplecode/SampleDither.cpp
@@ -70,14 +70,8 @@ static void draw_sweep(SkCanvas* c, int width, int height, SkScalar angle) {
}
static void make_bm(SkBitmap* bm) {
- bm->setConfig(SkBitmap::kARGB_8888_Config, 100, 100);
- bm->allocPixels();
-#if 0
- bm->eraseColor(SK_ColorBLUE);
- return;
-#else
+ bm->allocN32Pixels(100, 100);
bm->eraseColor(SK_ColorTRANSPARENT);
-#endif
SkCanvas c(*bm);
draw_sweep(&c, bm->width(), bm->height(), 0);
« no previous file with comments | « samplecode/SampleDash.cpp ('k') | samplecode/SampleDitherBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698