Don't pretend we can draw MaskFilters, it produces artifacts that make the text unreadable when using CSS shadows.
Review URL: https://codereview.chromium.org/12989032 git-svn-id: http://skia.googlecode.com/svn/trunk@8351 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
7e32851d54
commit
b62f93fdbc
@ -946,6 +946,12 @@ void SkPDFDevice::drawSprite(const SkDraw& d, const SkBitmap& bitmap,
|
|||||||
|
|
||||||
void SkPDFDevice::drawText(const SkDraw& d, const void* text, size_t len,
|
void SkPDFDevice::drawText(const SkDraw& d, const void* text, size_t len,
|
||||||
SkScalar x, SkScalar y, const SkPaint& paint) {
|
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);
|
SkPaint textPaint = calculate_text_paint(paint);
|
||||||
ScopedContentEntry content(this, d, textPaint, true);
|
ScopedContentEntry content(this, d, textPaint, true);
|
||||||
if (!content.entry()) {
|
if (!content.entry()) {
|
||||||
@ -985,6 +991,12 @@ void SkPDFDevice::drawText(const SkDraw& d, const void* text, size_t len,
|
|||||||
void SkPDFDevice::drawPosText(const SkDraw& d, const void* text, size_t len,
|
void SkPDFDevice::drawPosText(const SkDraw& d, const void* text, size_t len,
|
||||||
const SkScalar pos[], SkScalar constY,
|
const SkScalar pos[], SkScalar constY,
|
||||||
int scalarsPerPos, const SkPaint& paint) {
|
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);
|
SkASSERT(1 == scalarsPerPos || 2 == scalarsPerPos);
|
||||||
SkPaint textPaint = calculate_text_paint(paint);
|
SkPaint textPaint = calculate_text_paint(paint);
|
||||||
ScopedContentEntry content(this, d, textPaint, true);
|
ScopedContentEntry content(this, d, textPaint, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user