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

Unified Diff: skia/ext/platform_canvas.h

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix SkProxyCanvas leak 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.h
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index cbeb95b2bbe252cf5c5ebc7bd3abeeb3ad29dcf8..db10ac66b00aca27272371c09ab1eea0817462e8 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -120,6 +120,15 @@ SK_API SkCanvas* TryCreateBitmapCanvas(int width, int height, bool is_opaque);
// return NULL PlatformSurface.
SK_API bool SupportsPlatformPaint(const SkCanvas* canvas);
+// Returns true if native platform routines can be used to draw on the
alokp 2012/09/20 15:47:51 I am still not quite clear on the differences betw
reveman 2012/09/20 17:01:26 In the current implementation this means use of a
+// given canvas without any indirect rendering taking place. Indirect
+// rendering can be expensive so it's recommended to avoid using
+// platform paint if possible when direct platform paint isn't supported.
+// E.g. if there's a method to perform text rendering without platform
+// paint then it's likely much more efficient to use that method in the
+// case when this function returns false.
+SK_API bool SupportsDirectPlatformPaint(const SkCanvas* canvas);
+
// Draws into the a native platform surface, |context|. Forwards to
// DrawToNativeContext on a PlatformDevice instance bound to the top device.
// If no PlatformDevice instance is bound, is a no-operation.

Powered by Google App Engine
This is Rietveld 408576698