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

Unified Diff: src/pdf/SkPDFGraphicState.h

Issue 1788263002: SkPDF: remove all globally references SkPDFObjects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add explanatory comments Created 4 years, 9 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/SkPDFDevice.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFGraphicState.h
diff --git a/src/pdf/SkPDFGraphicState.h b/src/pdf/SkPDFGraphicState.h
index d816f721201d36fc6d7595cc28caa347ffbf1cfb..31848e8cac382b74793b531cf20771d74ac659e5 100644
--- a/src/pdf/SkPDFGraphicState.h
+++ b/src/pdf/SkPDFGraphicState.h
@@ -11,7 +11,7 @@
#define SkPDFGraphicState_DEFINED
#include "SkPaint.h"
-#include "SkPDFTypes.h"
+#include "SkPDFStream.h"
#include "SkChecksum.h"
class SkPDFCanon;
@@ -46,28 +46,21 @@ public:
static SkPDFGraphicState* GetGraphicStateForPaint(SkPDFCanon* canon,
const SkPaint& paint);
- /** 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.
+ /** Make a graphic state that only sets the passed soft mask.
* @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.
*
* These are not de-duped.
*/
- static SkPDFDict* GetSMaskGraphicState(SkPDFFormXObject* sMask,
- bool invert,
- SkPDFSMaskMode sMaskMode);
+ static sk_sp<SkPDFDict> GetSMaskGraphicState(SkPDFFormXObject* sMask,
+ bool invert,
+ SkPDFSMaskMode sMaskMode,
+ SkPDFCanon* canon);
- /** 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
- * to unreference it when done. This is needed to accommodate the weak
- * reference pattern used when the returned object is new and has no
- * other references.
- *
- * The returned object is a singleton.
- */
- static SkPDFDict* GetNoSMaskGraphicState();
+ /** Make a graphic state that only unsets the soft mask. */
+ static sk_sp<SkPDFDict> MakeNoSmaskGraphicState();
+ static sk_sp<SkPDFStream> MakeInvertFunction();
bool operator==(const SkPDFGraphicState& rhs) const {
return 0 == memcmp(&fStrokeWidth, &rhs.fStrokeWidth, 12);
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698