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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 12989032: Don't pretend we can draw MaskFilters, it produces artifacts that make the text unreadable when usi… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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: src/pdf/SkPDFDevice.cpp
===================================================================
--- src/pdf/SkPDFDevice.cpp (revision 8346)
+++ src/pdf/SkPDFDevice.cpp (working copy)
@@ -946,6 +946,12 @@
void SkPDFDevice::drawText(const SkDraw& d, const void* text, size_t len,
SkScalar x, SkScalar y, const SkPaint& paint) {
+ NOT_IMPLEMENTED(paint.getMaskFilter() != NULL, false);
+ if (paint.getMaskFilter() != NULL) {
+ // Don't pretend we support drawing MaskFilters, it makes for artifacts
+ // making text unreadable (e.g. same text twice when using CSS shadows).
+ return;
+ }
SkPaint textPaint = calculate_text_paint(paint);
ScopedContentEntry content(this, d, textPaint, true);
if (!content.entry()) {
@@ -985,6 +991,12 @@
void SkPDFDevice::drawPosText(const SkDraw& d, const void* text, size_t len,
const SkScalar pos[], SkScalar constY,
int scalarsPerPos, const SkPaint& paint) {
+ NOT_IMPLEMENTED(paint.getMaskFilter() != NULL, false);
+ if (paint.getMaskFilter() != NULL) {
+ // Don't pretend we support drawing MaskFilters, it makes for artifacts
+ // making text unreadable (e.g. same text twice when using CSS shadows).
+ return;
+ }
SkASSERT(1 == scalarsPerPos || 2 == scalarsPerPos);
SkPaint textPaint = calculate_text_paint(paint);
ScopedContentEntry content(this, d, textPaint, true);
« 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