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

Unified Diff: skia/ext/bitmap_platform_device_win.h

Issue 1839113002: Limit manual control of platform painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Privatize 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/bitmap_platform_device_skia.h ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.h
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 3f3a5e15f740e9dcbb15ca697405694472ea4945..a4702b5efa9da44ddb2d36ec8182b06714607afd 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -12,6 +12,8 @@
namespace skia {
+class ScopedPlatformPaint;
+
// A device is basically a wrapper around SkBitmap that provides a surface for
// SkCanvas to draw into. Our device provides a surface Windows can also write
// to. BitmapPlatformDevice creates a bitmap using CreateDIBSection() in a
@@ -38,14 +40,8 @@ class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice
~BitmapPlatformDevice() override;
- // PlatformDevice overrides
- // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
- // bitmap DC is lazy created.
- PlatformSurface BeginPlatformPaint() override;
- void EndPlatformPaint() override;
-
- // Loads the given transform and clipping region into the HDC. This is
- // overridden from SkBaseDevice.
+ // Loads (lazily) the given transform and clipping region into the HDC. This
+ // is overridden from SkBaseDevice, where it is deprecated.
void setMatrixClip(const SkMatrix& transform,
const SkRegion& region,
const SkClipStack&) override;
@@ -61,6 +57,11 @@ class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice
SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
private:
+ // PlatformDevice override
+ // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
+ // bitmap DC may be lazily created.
+ PlatformSurface BeginPlatformPaint() override;
+
// Private constructor.
BitmapPlatformDevice(HBITMAP hbitmap, const SkBitmap& bitmap);
@@ -103,11 +104,8 @@ class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice
// when |hbitmap_| is NULL (will be a NOP).
void LoadConfig();
-#ifdef SK_DEBUG
- int begin_paint_count_;
-#endif
-
DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
+ friend class ScopedPlatformPaint;
};
} // namespace skia
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.h ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698