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

Unified Diff: skia/ext/platform_canvas.cc

Issue 2294813002: Start hiding deprecated skia/ext/ functions (Closed)
Patch Set: re-add another SK_API 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
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index 7f0b8ab08a1735de806676b9edc0f7b3b7ccdd8b..de2daa6e7985040a5104261f2e67bcb1ff2c1875 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -33,10 +33,6 @@ bool GetBoolMetaData(const SkCanvas& canvas, const char* key) {
namespace skia {
-SkBaseDevice* GetTopDevice(const SkCanvas& canvas) {
- return canvas.getTopDevice(true);
-}
-
SkBitmap ReadPixels(SkCanvas* canvas) {
SkBitmap bitmap;
bitmap.setInfo(canvas->imageInfo());
@@ -62,7 +58,7 @@ bool GetWritablePixels(SkCanvas* canvas, SkPixmap* result) {
}
bool SupportsPlatformPaint(const SkCanvas* canvas) {
- return GetPlatformDevice(GetTopDevice(*canvas)) != nullptr;
+ return GetPlatformDevice(canvas->getTopDevice(true)) != nullptr;
}
size_t PlatformCanvasStrideForWidth(unsigned width) {
@@ -95,8 +91,8 @@ bool IsPreviewMetafile(const SkCanvas& canvas) {
}
CGContextRef GetBitmapContext(const SkCanvas& canvas) {
- SkBaseDevice* device = GetTopDevice(canvas);
- PlatformDevice* platform_device = GetPlatformDevice(device);
+ PlatformDevice* platform_device =
+ GetPlatformDevice(canvas.getTopDevice(true));
SkIRect clip_bounds;
canvas.getClipDeviceBounds(&clip_bounds);
return platform_device ?
@@ -111,7 +107,7 @@ ScopedPlatformPaint::ScopedPlatformPaint(SkCanvas* canvas) :
canvas_(canvas),
platform_surface_(nullptr) {
// TODO(tomhudson) we're assuming non-null canvas?
- PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
+ PlatformDevice* platform_device = GetPlatformDevice(canvas->getTopDevice(true));
if (platform_device) {
// Compensate for drawing to a layer rather than the entire canvas
SkMatrix ctm;
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698