From 33ca7f66564794bd262db4c6f0cc2f8083859fa9 Mon Sep 17 00:00:00 2001 From: "vandebo@chromium.org" Date: Mon, 20 Aug 2012 23:52:58 +0000 Subject: 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 --- skia/ext/vector_platform_device_emf_win.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'skia/ext') 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; -- cgit v1.1