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

Unified Diff: samplecode/SampleVertices.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/SampleUnpremul.cpp ('k') | samplecode/SampleWritePixels.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleVertices.cpp
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 323c4b58cb00889bd35400e1f4d04baa9e2c4ccb..4c3a17eb004bc394cbac09b961b01b492f2bd856 100644
--- a/samplecode/SampleVertices.cpp
+++ b/samplecode/SampleVertices.cpp
@@ -28,10 +28,9 @@
static SkShader* make_shader0(SkIPoint* size) {
SkBitmap bm;
size->set(2, 2);
- bm.setConfig(SkBitmap::kARGB_8888_Config, size->fX, size->fY);
SkPMColor color0 = SkPreMultiplyARGB(0x80, 0x80, 0xff, 0x80);
SkPMColor color1 = SkPreMultiplyARGB(0x40, 0xff, 0x00, 0xff);
- bm.allocPixels();
+ bm.allocN32Pixels(size->fX, size->fY);
bm.eraseColor(color0);
bm.lockPixels();
uint32_t* pixels = (uint32_t*) bm.getPixels();
« no previous file with comments | « samplecode/SampleUnpremul.cpp ('k') | samplecode/SampleWritePixels.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698