Implemented transparent gradients

R=vandebo@chromium.org, edisonn@google.com

Author: richardlin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18585002

git-svn-id: http://skia.googlecode.com/svn/trunk@10297 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFGraphicState.h b/src/pdf/SkPDFGraphicState.h
index 64f34f8..84c4291 100644
--- a/src/pdf/SkPDFGraphicState.h
+++ b/src/pdf/SkPDFGraphicState.h
@@ -28,6 +28,11 @@
 */
 class SkPDFGraphicState : public SkPDFDict {
 public:
+    enum SkPDFSMaskMode {
+        kAlpha_SMaskMode,
+        kLuminosity_SMaskMode
+    };
+
     virtual ~SkPDFGraphicState();
 
     virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
@@ -51,11 +56,13 @@
     /** Make a graphic state that only sets the passed soft mask. The
      *  reference count of the object is incremented and it is the caller's
      *  responsibility to unreference it when done.
-     *  @param sMask  The form xobject to use as a soft mask.
-     *  @param invert Indicates if the alpha of the sMask should be inverted.
+     *  @param sMask     The form xobject to use as a soft mask.
+     *  @param invert    Indicates if the alpha of the sMask should be inverted.
+     *  @param sMaskMode Whether to use alpha or luminosity for the sMask.
      */
     static SkPDFGraphicState* GetSMaskGraphicState(SkPDFFormXObject* sMask,
-                                                   bool invert);
+                                                   bool invert,
+                                                   SkPDFSMaskMode sMaskMode);
 
     /** Get a graphic state that only unsets the soft mask. The reference
      *  count of the object is incremented and it is the caller's responsibility