Index: src/pdf/SkPDFGraphicState.cpp |
diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp |
index 9cf21458233f6025807ce0be554a59e5e95b1d1c..43d22f308eb930ecc3f04464f1743367548563d3 100644 |
--- a/src/pdf/SkPDFGraphicState.cpp |
+++ b/src/pdf/SkPDFGraphicState.cpp |
@@ -138,13 +138,17 @@ SkPDFObject* SkPDFGraphicState::GetInvertFunction() { |
// static |
SkPDFGraphicState* SkPDFGraphicState::GetSMaskGraphicState( |
- SkPDFFormXObject* sMask, bool invert) { |
+ SkPDFFormXObject* sMask, bool invert, SkPDFSMaskMode sMaskMode) { |
// The practical chances of using the same mask more than once are unlikely |
// enough that it's not worth canonicalizing. |
SkAutoMutexAcquire lock(CanonicalPaintsMutex()); |
SkAutoTUnref<SkPDFDict> sMaskDict(new SkPDFDict("Mask")); |
- sMaskDict->insertName("S", "Alpha"); |
+ if (sMaskMode == kAlpha_SMaskMode) { |
+ sMaskDict->insertName("S", "Alpha"); |
+ } else if (sMaskMode == kLuminosity_SMaskMode) { |
+ sMaskDict->insertName("S", "Luminosity"); |
+ } |
sMaskDict->insert("G", new SkPDFObjRef(sMask))->unref(); |
SkPDFGraphicState* result = new SkPDFGraphicState; |