OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFShader_DEFINED | 10 #ifndef SkPDFShader_DEFINED |
(...skipping 27 matching lines...) Expand all Loading... |
38 * @param shader The SkShader to emulate. | 38 * @param shader The SkShader to emulate. |
39 * @param matrix The current transform. (PDF shaders are absolutely | 39 * @param matrix The current transform. (PDF shaders are absolutely |
40 * positioned, relative to where the page is drawn.) | 40 * positioned, relative to where the page is drawn.) |
41 * @param surfceBBox The bounding box of the drawing surface (with matrix | 41 * @param surfceBBox The bounding box of the drawing surface (with matrix |
42 * already applied). | 42 * already applied). |
43 * @param rasterScale Additional scale to be applied for early | 43 * @param rasterScale Additional scale to be applied for early |
44 * rasterization. | 44 * rasterization. |
45 */ | 45 */ |
46 static SkPDFObject* GetPDFShader(SkPDFDocument* doc, | 46 static SkPDFObject* GetPDFShader(SkPDFDocument* doc, |
47 SkScalar dpi, | 47 SkScalar dpi, |
48 const SkShader& shader, | 48 SkShader* shader, |
49 const SkMatrix& matrix, | 49 const SkMatrix& matrix, |
50 const SkIRect& surfaceBBox, | 50 const SkIRect& surfaceBBox, |
51 SkScalar rasterScale); | 51 SkScalar rasterScale); |
52 | 52 |
53 static sk_sp<SkPDFArray> MakeRangeObject(); | 53 static sk_sp<SkPDFArray> MakeRangeObject(); |
54 }; | 54 }; |
55 | 55 |
56 class SkPDFFunctionShader final : public SkPDFDict { | 56 class SkPDFFunctionShader final : public SkPDFDict { |
57 public: | 57 public: |
58 static SkPDFFunctionShader* Create(SkPDFCanon*, | 58 static SkPDFFunctionShader* Create(SkPDFCanon*, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 virtual ~SkPDFImageShader(); | 93 virtual ~SkPDFImageShader(); |
94 bool equals(const SkPDFShader::State&) const; | 94 bool equals(const SkPDFShader::State&) const; |
95 | 95 |
96 private: | 96 private: |
97 SkAutoTDelete<const SkPDFShader::State> fShaderState; | 97 SkAutoTDelete<const SkPDFShader::State> fShaderState; |
98 SkPDFImageShader(SkPDFShader::State*); | 98 SkPDFImageShader(SkPDFShader::State*); |
99 typedef SkPDFStream INHERITED; | 99 typedef SkPDFStream INHERITED; |
100 }; | 100 }; |
101 | 101 |
102 #endif | 102 #endif |
OLD | NEW |