aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleVertices.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-17 02:55:57 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-17 02:55:57 +0000
commita8c183125f2861067daf432cada06d431a795cd0 (patch)
tree202e5fd40988c363c3d83fd049e1b08b90bd683a /samplecode/SampleVertices.cpp
parent0817a87970849a7e4aa9cfab9ec362b1cc9e3674 (diff)
use SkColorType instead of SkBitmap::Config in samplecode
BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/169063002 git-svn-id: http://skia.googlecode.com/svn/trunk@13473 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleVertices.cpp')
-rw-r--r--samplecode/SampleVertices.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/samplecode/SampleVertices.cpp b/samplecode/SampleVertices.cpp
index 323c4b58cb..4c3a17eb00 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();