summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-20 23:52:58 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-20 23:52:58 +0000
commit33ca7f66564794bd262db4c6f0cc2f8083859fa9 (patch)
tree415f62be50493ca170db39a08726c0168dc86fbf /skia/ext
parent102bbfbaef1f52dfc770c51e39af24e14d2665dd (diff)
downloadchromium_src-33ca7f66564794bd262db4c6f0cc2f8083859fa9.zip
chromium_src-33ca7f66564794bd262db4c6f0cc2f8083859fa9.tar.gz
chromium_src-33ca7f66564794bd262db4c6f0cc2f8083859fa9.tar.bz2
Handle link annotations in Skia EMF device.
See Skia r4555 BUG=140184 Review URL: https://chromiumcodereview.appspot.com/10836343 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext')
-rw-r--r--skia/ext/vector_platform_device_emf_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc
index e644e87..3c34800 100644
--- a/skia/ext/vector_platform_device_emf_win.cc
+++ b/skia/ext/vector_platform_device_emf_win.cc
@@ -15,6 +15,9 @@
namespace skia {
+#define CHECK_FOR_NODRAW_ANNOTATION(paint) \
+ do { if (paint.isNoDrawAnnotation()) { return; } } while (0)
+
// static
SkDevice* VectorPlatformDeviceEmf::CreateDevice(
int width, int height, bool is_opaque, HANDLE shared_section) {
@@ -173,6 +176,7 @@ void VectorPlatformDeviceEmf::drawPoints(const SkDraw& draw,
void VectorPlatformDeviceEmf::drawRect(const SkDraw& draw,
const SkRect& rect,
const SkPaint& paint) {
+ CHECK_FOR_NODRAW_ANNOTATION(paint);
if (paint.getPathEffect()) {
// Draw a path instead.
SkPath path_orginal;
@@ -210,6 +214,7 @@ void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw,
const SkPaint& paint,
const SkMatrix* prePathMatrix,
bool pathIsMutable) {
+ CHECK_FOR_NODRAW_ANNOTATION(paint);
if (paint.getPathEffect()) {
// Apply the path effect forehand.
SkPath path_modified;