summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/platform_device_win.h5
-rw-r--r--skia/ext/vector_platform_device_emf_win.h11
2 files changed, 11 insertions, 5 deletions
diff --git a/skia/ext/platform_device_win.h b/skia/ext/platform_device_win.h
index 57afa89..f21ca1f 100644
--- a/skia/ext/platform_device_win.h
+++ b/skia/ext/platform_device_win.h
@@ -52,6 +52,11 @@ class SK_API PlatformDevice : public SkDevice {
// Returns if GDI is allowed to render text to this device.
virtual bool IsNativeFontRenderingAllowed() { return true; }
+ // True if AlphaBlend() was called during a
+ // BeginPlatformPaint()/EndPlatformPaint() pair.
+ // Used by the printing subclasses. See |VectorPlatformDeviceEmf|.
+ virtual bool AlphaBlendUsed() const { return false; }
+
// 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.
static bool LoadPathToDC(HDC context, const SkPath& path);
diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h
index 6044b7c..61283ff 100644
--- a/skia/ext/vector_platform_device_emf_win.h
+++ b/skia/ext/vector_platform_device_emf_win.h
@@ -31,8 +31,10 @@ class VectorPlatformDeviceEmf : public PlatformDevice {
virtual ~VectorPlatformDeviceEmf();
// PlatformDevice methods
- virtual PlatformSurface BeginPlatformPaint();
- virtual void DrawToNativeContext(HDC dc, int x, int y, const RECT* src_rect);
+ virtual PlatformSurface BeginPlatformPaint() OVERRIDE;
+ virtual void DrawToNativeContext(HDC dc, int x, int y,
+ const RECT* src_rect) OVERRIDE;
+ virtual bool AlphaBlendUsed() const OVERRIDE { return alpha_blend_used_; }
// SkDevice methods.
virtual uint32_t getDeviceCapabilities();
@@ -70,15 +72,14 @@ class VectorPlatformDeviceEmf : public PlatformDevice {
const SkPaint&) OVERRIDE;
virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region,
- const SkClipStack&);
+ const SkClipStack&) OVERRIDE;
void LoadClipRegion();
- bool alpha_blend_used() const { return alpha_blend_used_; }
protected:
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width,
int height, bool isOpaque,
- Usage usage);
+ Usage usage) OVERRIDE;
private:
// Applies the SkPaint's painting properties in the current GDI context, if