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

Unified Diff: samplecode/SampleLayers.cpp

Issue 163603003: add peekPixels to SkCanvas and SkSurface (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/SampleCircle.cpp ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLayers.cpp
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 483943d5d4c5b690092fa8601c4df465917c957c..bc8b8730bb682db18bbc9da93cf9906080492f6a 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();
« no previous file with comments | « samplecode/SampleCircle.cpp ('k') | src/core/SkBitmapDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698