aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2014-12-02 19:40:18 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-02 19:40:18 -0800
commitaf641a1c10f176cb9617026d3cc93c117a85d13d (patch)
treed655e0b8250823136d12be8ac638f5b5c9208fdb /src/pdf
parent1962f521a239a86417509c0628a99ac0b5ba0bc2 (diff)
Revert "Change clear() to respect the clip"
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDevice.cpp14
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);