aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleLayers.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-13 17:14:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-13 17:14:46 +0000
commitc3bd8af6d5722e854feca70c40d92f4954c5b67b (patch)
treed66f5fa5e139469c523882685cd1dfb4c8f83529 /samplecode/SampleLayers.cpp
parente1df56579f815fe1f788380e9342abe5284bab51 (diff)
add peekPixels to SkCanvas and SkSurface
fix reference to SkBaseDevice, which was only a problem in no-gpu build This reverts commit 4fa44a6bf73891b21917fb90d02beef9143bffa3. R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/163603003 git-svn-id: http://skia.googlecode.com/svn/trunk@13432 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleLayers.cpp')
-rw-r--r--samplecode/SampleLayers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 483943d5d4..bc8b8730bb 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -42,10 +42,10 @@ static void dump_layers(const char label[], SkCanvas* canvas) {
SkCanvas::LayerIter iter(canvas, true);
int index = 0;
while (!iter.done()) {
- const SkBitmap& bm = iter.device()->accessBitmap(false);
+ SkImageInfo info = iter.device()->imageInfo();
const SkIRect& clip = iter.clip().getBounds();
SkDebugf("Layer[%d] bitmap [%d %d] X=%d Y=%d clip=[%d %d %d %d] alpha=%d\n", index++,
- bm.width(), bm.height(), iter.x(), iter.y(),
+ info.width(), info.height(), iter.x(), iter.y(),
clip.fLeft, clip.fTop, clip.fRight, clip.fBottom,
iter.paint().getAlpha());
iter.next();