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

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: 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/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..263baac01e4d8294b2c66728b751d661b0166c3b 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_device.h"
#include "skia/ext/refptr.h"
@@ -38,14 +39,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;
@@ -53,6 +48,11 @@ class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice
void DrawToHDC(HDC dc, int x, int y, const RECT* src_rect) override;
protected:
+ // PlatformDevice overrides
+ // Retrieves the bitmap DC, which is the memory DC for our bitmap data. The
+ // bitmap DC may be lazily created.
+ PlatformSurface BeginPlatformPaint() override;
+
// Flushes the Windows device context so that the pixel data can be accessed
// directly by Skia. Overridden from SkBaseDevice, this is called when Skia
// starts accessing pixel data.
@@ -108,6 +108,7 @@ class SK_API BitmapPlatformDevice : public SkBitmapDevice, public PlatformDevice
#endif
DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
+ friend class skia::ScopedPlatformPaint;
};
} // namespace skia

Powered by Google App Engine
This is Rietveld 408576698