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

Unified Diff: src/core/SkCanvas.cpp

Issue 973973003: Text blob run paints should be filtered. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix iterator filter skipping Created 5 years, 10 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 | « include/core/SkDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c10d390f56f61396fa2ddbb55d35ab70637f577c..8b88a038146c17b3c691ccbcf80c5ffa62422bfb 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -2161,14 +2161,21 @@ void SkCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
}
}
+ // We cannot filter in the looper as we normally do, because the paint is
+ // incomplete at this point (text-related attributes are embedded within blob run paints).
+ SkDrawFilter* drawFilter = fMCRec->fFilter;
+ fMCRec->fFilter = NULL;
+
LOOPER_BEGIN(paint, SkDrawFilter::kText_Type, NULL)
while (iter.next()) {
SkDeviceFilteredPaint dfp(iter.fDevice, looper.paint());
- iter.fDevice->drawTextBlob(iter, blob, x, y, dfp.paint());
+ iter.fDevice->drawTextBlob(iter, blob, x, y, dfp.paint(), drawFilter);
}
LOOPER_END
+
+ fMCRec->fFilter = drawFilter;
}
// These will become non-virtual, so they always call the (virtual) onDraw... method
« no previous file with comments | « include/core/SkDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698