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

Unified Diff: src/pdf/SkPDFShader.h

Issue 944643002: PDF: Now threadsafe! (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: TODO=DONE Created 5 years, 10 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/SkPDFImage.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.h
diff --git a/src/pdf/SkPDFShader.h b/src/pdf/SkPDFShader.h
index 3fb962ab21431c7b94be4aee0f7244339a3fb448..5be47a382f62c514fafd5f064a3c6b03de681387 100644
--- a/src/pdf/SkPDFShader.h
+++ b/src/pdf/SkPDFShader.h
@@ -14,6 +14,7 @@
#include "SkPDFStream.h"
#include "SkPDFTypes.h"
+class SkPDFCanon;
class SkMatrix;
class SkShader;
struct SkIRect;
@@ -42,7 +43,9 @@ public:
* @param rasterScale Additional scale to be applied for early
* rasterization.
*/
- static SkPDFObject* GetPDFShader(const SkShader& shader,
+ static SkPDFObject* GetPDFShader(SkPDFCanon* canon,
+ SkScalar dpi,
+ const SkShader& shader,
const SkMatrix& matrix,
const SkIRect& surfaceBBox,
SkScalar rasterScale);
@@ -52,14 +55,16 @@ class SkPDFFunctionShader : public SkPDFDict {
SK_DECLARE_INST_COUNT(SkPDFFunctionShader);
public:
- static SkPDFFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*);
+ static SkPDFFunctionShader* Create(SkPDFCanon*,
+ SkAutoTDelete<SkPDFShader::State>*);
virtual ~SkPDFFunctionShader();
bool equals(const SkPDFShader::State&) const;
private:
+ SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkTDArray<SkPDFObject*> fResources;
- explicit SkPDFFunctionShader(SkPDFShader::State* state);
+ SkPDFFunctionShader(SkPDFCanon*, SkPDFShader::State*);
typedef SkPDFDict INHERITED;
};
@@ -70,27 +75,33 @@ private:
*/
class SkPDFAlphaFunctionShader : public SkPDFStream {
public:
- static SkPDFAlphaFunctionShader* Create(SkAutoTDelete<SkPDFShader::State>*);
+ static SkPDFAlphaFunctionShader* Create(SkPDFCanon*,
+ SkScalar dpi,
+ SkAutoTDelete<SkPDFShader::State>*);
virtual ~SkPDFAlphaFunctionShader();
bool equals(const SkPDFShader::State&) const;
private:
+ SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkAutoTUnref<SkPDFObject> fColorShader;
SkAutoTUnref<SkPDFResourceDict> fResourceDict;
- explicit SkPDFAlphaFunctionShader(SkPDFShader::State* state);
+ SkPDFAlphaFunctionShader(SkPDFCanon*, SkPDFShader::State*);
};
class SkPDFImageShader : public SkPDFStream {
public:
- static SkPDFImageShader* Create(SkAutoTDelete<SkPDFShader::State>*);
+ static SkPDFImageShader* Create(SkPDFCanon*,
+ SkScalar dpi,
+ SkAutoTDelete<SkPDFShader::State>*);
virtual ~SkPDFImageShader();
bool equals(const SkPDFShader::State&) const;
private:
+ SkPDFCanon* fCanon;
SkAutoTDelete<const SkPDFShader::State> fShaderState;
SkTSet<SkPDFObject*> fResources;
- explicit SkPDFImageShader(SkPDFShader::State* state);
+ SkPDFImageShader(SkPDFCanon*, SkPDFShader::State*);
};
#endif
« no previous file with comments | « src/pdf/SkPDFImage.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698