Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Unified Diff: src/pdf/SkPDFGraphicState.cpp

Issue 18585002: Implemented transparent gradients (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Merge new SkPDFResourceDict method names Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFGraphicState.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/pdf/SkPDFGraphicState.h ('k') | src/pdf/SkPDFShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698