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

Unified Diff: skia/ext/platform_device.h

Issue 1839113002: Limit manual control of platform painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Created 4 years, 9 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.cc ('k') | skia/ext/platform_device_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_device.h
diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h
index bef2714b693c7b25329c271edad80b04317dbe97..0e25dda774085b1fce09815bf8924b151f525199 100644
--- a/skia/ext/platform_device.h
+++ b/skia/ext/platform_device.h
@@ -23,6 +23,7 @@ class SkRegion;
namespace skia {
class PlatformDevice;
+class ScopedPlatformPaint;
// The following routines provide accessor points for the functionality
// exported by the various PlatformDevice ports.
@@ -61,14 +62,6 @@ class SK_API PlatformDevice {
virtual CGContextRef GetBitmapContext() = 0;
#endif
- // The DC that corresponds to the bitmap, used for GDI operations drawing
- // into the bitmap. This is possibly heavyweight, so it should be existant
- // only during one pass of rendering.
- virtual PlatformSurface BeginPlatformPaint();
-
- // Finish a previous call to beginPlatformPaint.
- virtual void EndPlatformPaint();
-
#if defined(OS_WIN)
// Loads a SkPath into the GDI context. The path can there after be used for
// clipping or as a stroke. Returns false if the path failed to be loaded.
@@ -87,6 +80,11 @@ class SK_API PlatformDevice {
#endif
protected:
+ // The DC that corresponds to the bitmap, used for GDI operations drawing
+ // into the bitmap. This is possibly heavyweight, so it should be existant
+ // only during one pass of rendering.
+ virtual PlatformSurface BeginPlatformPaint();
f(malita) 2016/03/29 18:14:13 nit: now private
+
#if defined(OS_WIN)
// Arrays must be inside structures.
struct CubicPoints {
@@ -102,6 +100,8 @@ class SK_API PlatformDevice {
// Transforms SkPath's paths into a series of cubic path.
static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath);
#endif
+
+ friend class ScopedPlatformPaint;
};
} // namespace skia
« no previous file with comments | « skia/ext/platform_canvas.cc ('k') | skia/ext/platform_device_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698