Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index 6592ba0c68477ffc96f4153e58c95a3866bd6a5f..fb8df838eb72644beb5c8b08753f07cb58a5820f 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); |