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

Unified Diff: skia/ext/platform_canvas_unittest.cc

Issue 2294813002: Start hiding deprecated skia/ext/ functions (Closed)
Patch Set: fix Mac typo Created 4 years, 4 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 6f494831ccc449e71d2e4d184db2464ee1e1653a..7a2b26c6e0a9994192fc1d6081f9116f1f3b061f 100644
--- a/skia/ext/platform_canvas_unittest.cc
+++ b/skia/ext/platform_canvas_unittest.cc
@@ -84,13 +84,13 @@ bool VerifyRect(const SkCanvas& canvas,
// rectangle. Basically, we're just checking to make sure that the pixels in the
// middle are of rect_color and pixels in the corners are of canvas_color.
bool VerifyRoundedRect(const SkCanvas& canvas,
+ SkBaseDevice* device,
f(malita) 2016/08/30 17:41:23 Nit: since device is always derived from canvas, i
tomhudson 2016/08/30 17:48:48 D'oh, yes.
uint32_t canvas_color,
uint32_t rect_color,
int x,
int y,
int w,
int h) {
- SkBaseDevice* device = skia::GetTopDevice(canvas);
const SkBitmap& bitmap = device->accessBitmap(false);
SkAutoLockPixels lock(bitmap);
@@ -406,7 +406,8 @@ TEST(PlatformCanvas, TranslateLayer) {
#endif
}
canvas->restore();
- EXPECT_TRUE(VerifyRoundedRect(*canvas, SK_ColorWHITE, SK_ColorBLACK,
+ EXPECT_TRUE(VerifyRoundedRect(*canvas, canvas->getTopDevice(true),
+ SK_ColorWHITE, SK_ColorBLACK,
kInnerX + 1, kInnerY + 1, kInnerW, kInnerH));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698