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

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: 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
Index: skia/ext/platform_device.h
diff --git a/skia/ext/platform_device.h b/skia/ext/platform_device.h
index bef2714b693c7b25329c271edad80b04317dbe97..d72cc9d9d5526c7d610b528652fd161f12b4bc46 100644
--- a/skia/ext/platform_device.h
+++ b/skia/ext/platform_device.h
@@ -12,6 +12,7 @@
#include <vector>
#endif
+#include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_surface.h"
#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkTypes.h"
@@ -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();
+
#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 skia::ScopedPlatformPaint;
};
} // namespace skia

Powered by Google App Engine
This is Rietveld 408576698