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

Unified Diff: skia/ext/platform_canvas_unittest.cc

Issue 2340813006: accessBitmap is no longer called/needed (Closed)
Patch Set: peek at entire pixels Created 4 years, 3 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
Index: skia/ext/platform_canvas_unittest.cc
diff --git a/skia/ext/platform_canvas_unittest.cc b/skia/ext/platform_canvas_unittest.cc
index 8f30a5c2b071098f93e9a07298d602c2aeb31069..699466ea3805e70117228321eaa8e98c8f18649e 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -102,9 +102,10 @@ bool VerifyRoundedRect(const SkCanvas& canvas,
int y,
int w,
int h) {
- SkBaseDevice* device = canvas.getTopDevice(true);
- const SkBitmap& bitmap = device->accessBitmap(false);
- SkAutoLockPixels lock(bitmap);
+ SkPixmap pixmap;
+ ASSERT_TRUE(canvas.peekPixels(&pixmap));
+ SkBitmap bitmap;
+ bitmap.installPixels(pixmap);
// Check corner points first. They should be of canvas_color.
if (!IsOfColor(bitmap, x, y, canvas_color)) return false;
« skia/ext/bitmap_platform_device_skia.cc ('K') | « skia/ext/bitmap_platform_device_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698