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

Unified Diff: skia/ext/vector_platform_device_emf_win.cc

Issue 10836343: Handle link annotations in Skia EMF device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_emf_win.cc
diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc
index e644e874e5fdc6c58897bf50f571b9986ca5042e..3c34800fa790e7d444570e47d92a29a678909278 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)
Vitaly Buka (NO REVIEWS) 2012/08/20 20:36:45 Why do you need macro for two instances of such si
+
// 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698