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

Side by Side Diff: src/pdf/SkPDFShader.h

Issue 1461403002: SkPDF: add `final` keyword to leaf classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * rasterization. 43 * rasterization.
44 */ 44 */
45 static SkPDFObject* GetPDFShader(SkPDFCanon* canon, 45 static SkPDFObject* GetPDFShader(SkPDFCanon* canon,
46 SkScalar dpi, 46 SkScalar dpi,
47 const SkShader& shader, 47 const SkShader& shader,
48 const SkMatrix& matrix, 48 const SkMatrix& matrix,
49 const SkIRect& surfaceBBox, 49 const SkIRect& surfaceBBox,
50 SkScalar rasterScale); 50 SkScalar rasterScale);
51 }; 51 };
52 52
53 class SkPDFFunctionShader : public SkPDFDict { 53 class SkPDFFunctionShader final : public SkPDFDict {
54 54
55 55
56 public: 56 public:
57 static SkPDFFunctionShader* Create(SkPDFCanon*, 57 static SkPDFFunctionShader* Create(SkPDFCanon*,
58 SkAutoTDelete<SkPDFShader::State>*); 58 SkAutoTDelete<SkPDFShader::State>*);
59 virtual ~SkPDFFunctionShader(); 59 virtual ~SkPDFFunctionShader();
60 bool equals(const SkPDFShader::State&) const; 60 bool equals(const SkPDFShader::State&) const;
61 61
62 private: 62 private:
63 SkAutoTDelete<const SkPDFShader::State> fShaderState; 63 SkAutoTDelete<const SkPDFShader::State> fShaderState;
64 SkPDFFunctionShader(SkPDFShader::State*); 64 SkPDFFunctionShader(SkPDFShader::State*);
65 typedef SkPDFDict INHERITED; 65 typedef SkPDFDict INHERITED;
66 }; 66 };
67 67
68 /** 68 /**
69 * A shader for PDF gradients. This encapsulates the function shader 69 * A shader for PDF gradients. This encapsulates the function shader
70 * inside a tiling pattern while providing a common pattern interface. 70 * inside a tiling pattern while providing a common pattern interface.
71 * The encapsulation allows the use of a SMask for transparency gradients. 71 * The encapsulation allows the use of a SMask for transparency gradients.
72 */ 72 */
73 class SkPDFAlphaFunctionShader : public SkPDFStream { 73 class SkPDFAlphaFunctionShader final : public SkPDFStream {
74 public: 74 public:
75 static SkPDFAlphaFunctionShader* Create(SkPDFCanon*, 75 static SkPDFAlphaFunctionShader* Create(SkPDFCanon*,
76 SkScalar dpi, 76 SkScalar dpi,
77 SkAutoTDelete<SkPDFShader::State>*); 77 SkAutoTDelete<SkPDFShader::State>*);
78 virtual ~SkPDFAlphaFunctionShader(); 78 virtual ~SkPDFAlphaFunctionShader();
79 bool equals(const SkPDFShader::State&) const; 79 bool equals(const SkPDFShader::State&) const;
80 80
81 private: 81 private:
82 SkAutoTDelete<const SkPDFShader::State> fShaderState; 82 SkAutoTDelete<const SkPDFShader::State> fShaderState;
83 SkPDFAlphaFunctionShader(SkPDFShader::State*); 83 SkPDFAlphaFunctionShader(SkPDFShader::State*);
84 typedef SkPDFStream INHERITED; 84 typedef SkPDFStream INHERITED;
85 }; 85 };
86 86
87 class SkPDFImageShader : public SkPDFStream { 87 class SkPDFImageShader final : public SkPDFStream {
88 public: 88 public:
89 static SkPDFImageShader* Create(SkPDFCanon*, 89 static SkPDFImageShader* Create(SkPDFCanon*,
90 SkScalar dpi, 90 SkScalar dpi,
91 SkAutoTDelete<SkPDFShader::State>*); 91 SkAutoTDelete<SkPDFShader::State>*);
92 virtual ~SkPDFImageShader(); 92 virtual ~SkPDFImageShader();
93 bool equals(const SkPDFShader::State&) const; 93 bool equals(const SkPDFShader::State&) const;
94 94
95 private: 95 private:
96 SkAutoTDelete<const SkPDFShader::State> fShaderState; 96 SkAutoTDelete<const SkPDFShader::State> fShaderState;
97 SkPDFImageShader(SkPDFShader::State*); 97 SkPDFImageShader(SkPDFShader::State*);
98 typedef SkPDFStream INHERITED; 98 typedef SkPDFStream INHERITED;
99 }; 99 };
100 100
101 #endif 101 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698