aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFFormXObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/SkPDFFormXObject.cpp')
-rw-r--r--src/pdf/SkPDFFormXObject.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp
index 346bce6e85..ef839a3b4e 100644
--- a/src/pdf/SkPDFFormXObject.cpp
+++ b/src/pdf/SkPDFFormXObject.cpp
@@ -39,6 +39,14 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) {
insert("Subtype", new SkPDFName("Form"))->unref();
insert("BBox", device->getMediaBox().get());
insert("Resources", device->getResourceDict().get());
+
+ // Right now SkPDFFormXObject is only used for saveLayer, which implies
+ // isolated blending. Do this conditionally if that changes.
+ SkRefPtr<SkPDFDict> group = new SkPDFDict("Group");
+ group->unref(); // SkRefPtr and new both took a reference.
+ group->insert("S", new SkPDFName("Transparency"))->unref();
+ group->insert("I", new SkPDFBool(true))->unref(); // Isolated.
+ insert("Group", group.get());
}
SkPDFFormXObject::~SkPDFFormXObject() {