diff options
author | reed <reed@chromium.org> | 2014-12-02 19:40:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 19:40:18 -0800 |
commit | af641a1c10f176cb9617026d3cc93c117a85d13d (patch) | |
tree | d655e0b8250823136d12be8ac638f5b5c9208fdb /src/pdf | |
parent | 1962f521a239a86417509c0628a99ac0b5ba0bc2 (diff) |
Revert "Change clear() to respect the clip"
This reverts commit 3729469d6a12266037b697c2192768545e097ab0.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/778563002
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 6592ba0c68..fb8df838eb 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -801,6 +801,20 @@ void SkPDFDevice::cleanUp(bool clearFontUsage) { } } +void SkPDFDevice::clear(SkColor color) { + this->cleanUp(true); + this->init(); + + SkPaint paint; + paint.setColor(color); + paint.setStyle(SkPaint::kFill_Style); + SkMatrix identity; + identity.reset(); + ScopedContentEntry content(this, &fExistingClipStack, fExistingClipRegion, + identity, paint); + internalDrawPaint(paint, content.entry()); +} + void SkPDFDevice::drawPaint(const SkDraw& d, const SkPaint& paint) { SkPaint newPaint = paint; newPaint.setStyle(SkPaint::kFill_Style); |