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

Unified Diff: skia/ext/platform_canvas.cc

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add IsPlatformPaintSupported(), update comment in WebPluginDelegateProxy::Paint and require direct … Created 8 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.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index d7cfc75e2ac2f14581e465204f028acf215da9fb..02a354d14847c777e761dd025c44eb3365e76d7a 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -47,9 +47,16 @@ SkDevice* GetTopDevice(const SkCanvas& canvas) {
return canvas.getTopDevice(true);
}
-bool SupportsPlatformPaint(const SkCanvas* canvas) {
+PlatformDevice::PlatformPaint PlatformPaintSupport(const SkCanvas* canvas) {
PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
- return platform_device && platform_device->SupportsPlatformPaint();
+ if (!platform_device)
+ return PlatformDevice::PLATFORM_PAINT_UNSUPPORTED;
+ return platform_device->PlatformPaintSupport();
+}
+
+bool IsPlatformPaintSupported(const SkCanvas* canvas) {
+ return PlatformPaintSupport(canvas) !=
+ PlatformDevice::PLATFORM_PAINT_UNSUPPORTED;
}
PlatformSurface BeginPlatformPaint(SkCanvas* canvas) {

Powered by Google App Engine
This is Rietveld 408576698