summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
authortwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 16:33:51 +0000
committertwiz@chromium.org <twiz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 16:33:51 +0000
commit221acdc9462193c9bba613ca4a767afc9a683e22 (patch)
tree90f3888f8c50135ddd1194d7bbdca2cc3793c284 /skia/ext
parenta1fe1ca172ed45e07a1211d9fc78294d66e7208d (diff)
downloadchromium_src-221acdc9462193c9bba613ca4a767afc9a683e22.zip
chromium_src-221acdc9462193c9bba613ca4a767afc9a683e22.tar.gz
chromium_src-221acdc9462193c9bba613ca4a767afc9a683e22.tar.bz2
Remove cast to VectorPlatformDeviceEMF.
Dependencies on PlatformDevice, and its children should be minimized. Also, added some OVERRIDE tags to touched files. BUG=None TEST=None Review URL: http://codereview.chromium.org/7465104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext')
-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