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

Side by Side Diff: src/core/SkCoreBlitters.h

Issue 1210283002: fix up virtual / override stuff (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBlitter.h ('k') | src/core/SkPictureRecord.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkCoreBlitters_DEFINED 8 #ifndef SkCoreBlitters_DEFINED
9 #define SkCoreBlitters_DEFINED 9 #define SkCoreBlitters_DEFINED
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override; 66 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
67 void blitV(int x, int y, int height, SkAlpha alpha) override; 67 void blitV(int x, int y, int height, SkAlpha alpha) override;
68 void blitRect(int x, int y, int width, int height) override; 68 void blitRect(int x, int y, int width, int height) override;
69 void blitMask(const SkMask&, const SkIRect&) override; 69 void blitMask(const SkMask&, const SkIRect&) override;
70 const SkPixmap* justAnOpaqueColor(uint32_t*) override; 70 const SkPixmap* justAnOpaqueColor(uint32_t*) override;
71 }; 71 };
72 72
73 class SkA8_Blitter : public SkRasterBlitter { 73 class SkA8_Blitter : public SkRasterBlitter {
74 public: 74 public:
75 SkA8_Blitter(const SkPixmap& device, const SkPaint& paint); 75 SkA8_Blitter(const SkPixmap& device, const SkPaint& paint);
76 virtual void blitH(int x, int y, int width); 76 void blitH(int x, int y, int width) override;
77 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 77 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
78 virtual void blitV(int x, int y, int height, SkAlpha alpha); 78 void blitV(int x, int y, int height, SkAlpha alpha) override;
79 virtual void blitRect(int x, int y, int width, int height); 79 void blitRect(int x, int y, int width, int height) override;
80 virtual void blitMask(const SkMask&, const SkIRect&); 80 void blitMask(const SkMask&, const SkIRect&) override;
81 virtual const SkPixmap* justAnOpaqueColor(uint32_t*); 81 const SkPixmap* justAnOpaqueColor(uint32_t*) override;
82 82
83 private: 83 private:
84 unsigned fSrcA; 84 unsigned fSrcA;
85 85
86 // illegal 86 // illegal
87 SkA8_Blitter& operator=(const SkA8_Blitter&); 87 SkA8_Blitter& operator=(const SkA8_Blitter&);
88 88
89 typedef SkRasterBlitter INHERITED; 89 typedef SkRasterBlitter INHERITED;
90 }; 90 };
91 91
92 class SkA8_Shader_Blitter : public SkShaderBlitter { 92 class SkA8_Shader_Blitter : public SkShaderBlitter {
93 public: 93 public:
94 SkA8_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, 94 SkA8_Shader_Blitter(const SkPixmap& device, const SkPaint& paint,
95 SkShader::Context* shaderContext); 95 SkShader::Context* shaderContext);
96 virtual ~SkA8_Shader_Blitter(); 96 virtual ~SkA8_Shader_Blitter();
97 virtual void blitH(int x, int y, int width); 97 void blitH(int x, int y, int width) override;
98 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 98 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
99 virtual void blitMask(const SkMask&, const SkIRect&); 99 void blitMask(const SkMask&, const SkIRect&) override;
100 100
101 private: 101 private:
102 SkXfermode* fXfermode; 102 SkXfermode* fXfermode;
103 SkPMColor* fBuffer; 103 SkPMColor* fBuffer;
104 uint8_t* fAAExpand; 104 uint8_t* fAAExpand;
105 105
106 // illegal 106 // illegal
107 SkA8_Shader_Blitter& operator=(const SkA8_Shader_Blitter&); 107 SkA8_Shader_Blitter& operator=(const SkA8_Shader_Blitter&);
108 108
109 typedef SkShaderBlitter INHERITED; 109 typedef SkShaderBlitter INHERITED;
110 }; 110 };
111 111
112 //////////////////////////////////////////////////////////////// 112 ////////////////////////////////////////////////////////////////
113 113
114 class SkARGB32_Blitter : public SkRasterBlitter { 114 class SkARGB32_Blitter : public SkRasterBlitter {
115 public: 115 public:
116 SkARGB32_Blitter(const SkPixmap& device, const SkPaint& paint); 116 SkARGB32_Blitter(const SkPixmap& device, const SkPaint& paint);
117 virtual void blitH(int x, int y, int width); 117 void blitH(int x, int y, int width) override;
118 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 118 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
119 virtual void blitV(int x, int y, int height, SkAlpha alpha); 119 void blitV(int x, int y, int height, SkAlpha alpha) override;
120 virtual void blitRect(int x, int y, int width, int height); 120 void blitRect(int x, int y, int width, int height) override;
121 virtual void blitMask(const SkMask&, const SkIRect&); 121 void blitMask(const SkMask&, const SkIRect&) override;
122 virtual const SkPixmap* justAnOpaqueColor(uint32_t*); 122 const SkPixmap* justAnOpaqueColor(uint32_t*) override;
123 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; 123 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
124 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; 124 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
125 125
126 protected: 126 protected:
127 SkColor fColor; 127 SkColor fColor;
128 SkPMColor fPMColor; 128 SkPMColor fPMColor;
129 129
130 private: 130 private:
131 unsigned fSrcA, fSrcR, fSrcG, fSrcB; 131 unsigned fSrcA, fSrcR, fSrcG, fSrcB;
132 132
133 // illegal 133 // illegal
134 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&); 134 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&);
135 135
136 typedef SkRasterBlitter INHERITED; 136 typedef SkRasterBlitter INHERITED;
137 }; 137 };
138 138
139 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter { 139 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter {
140 public: 140 public:
141 SkARGB32_Opaque_Blitter(const SkPixmap& device, const SkPaint& paint) 141 SkARGB32_Opaque_Blitter(const SkPixmap& device, const SkPaint& paint)
142 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); } 142 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); }
143 virtual void blitMask(const SkMask&, const SkIRect&); 143 void blitMask(const SkMask&, const SkIRect&) override;
144 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; 144 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
145 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; 145 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
146 146
147 private: 147 private:
148 typedef SkARGB32_Blitter INHERITED; 148 typedef SkARGB32_Blitter INHERITED;
149 }; 149 };
150 150
151 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter { 151 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter {
152 public: 152 public:
153 SkARGB32_Black_Blitter(const SkPixmap& device, const SkPaint& paint) 153 SkARGB32_Black_Blitter(const SkPixmap& device, const SkPaint& paint)
154 : INHERITED(device, paint) {} 154 : INHERITED(device, paint) {}
155 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 155 void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[] ) override;
156 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override; 156 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
157 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override; 157 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
158 158
159 private: 159 private:
160 typedef SkARGB32_Opaque_Blitter INHERITED; 160 typedef SkARGB32_Opaque_Blitter INHERITED;
161 }; 161 };
162 162
163 class SkARGB32_Shader_Blitter : public SkShaderBlitter { 163 class SkARGB32_Shader_Blitter : public SkShaderBlitter {
164 public: 164 public:
165 SkARGB32_Shader_Blitter(const SkPixmap& device, const SkPaint& paint, 165 SkARGB32_Shader_Blitter(const SkPixmap& device, const SkPaint& paint,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 These pre-conditions must be handled by the caller, in our case 199 These pre-conditions must be handled by the caller, in our case
200 SkBlitter::Choose(...) 200 SkBlitter::Choose(...)
201 */ 201 */
202 202
203 SkBlitter* SkBlitter_ChooseD565(const SkPixmap& device, const SkPaint& paint, 203 SkBlitter* SkBlitter_ChooseD565(const SkPixmap& device, const SkPaint& paint,
204 SkShader::Context* shaderContext, 204 SkShader::Context* shaderContext,
205 SkTBlitterAllocator* allocator); 205 SkTBlitterAllocator* allocator);
206 206
207 #endif 207 #endif
OLDNEW
« no previous file with comments | « src/core/SkBlitter.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698