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

Side by Side Diff: src/core/SkBlitter_RGB16.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkBuffer.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkBlitRow.h" 10 #include "SkBlitRow.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 dst[count - 1] = value; 52 dst[count - 1] = value;
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 /////////////////////////////////////////////////////////////////////////////// 57 ///////////////////////////////////////////////////////////////////////////////
58 58
59 class SkRGB16_Blitter : public SkRasterBlitter { 59 class SkRGB16_Blitter : public SkRasterBlitter {
60 public: 60 public:
61 SkRGB16_Blitter(const SkBitmap& device, const SkPaint& paint); 61 SkRGB16_Blitter(const SkBitmap& device, const SkPaint& paint);
62 void blitH(int x, int y, int width) SK_OVERRIDE; 62 void blitH(int x, int y, int width) override;
63 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 63 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
64 const int16_t* runs) SK_OVERRIDE; 64 const int16_t* runs) override;
65 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; 65 void blitV(int x, int y, int height, SkAlpha alpha) override;
66 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 66 void blitRect(int x, int y, int width, int height) override;
67 virtual void blitMask(const SkMask&, 67 virtual void blitMask(const SkMask&,
68 const SkIRect&) SK_OVERRIDE; 68 const SkIRect&) override;
69 const SkBitmap* justAnOpaqueColor(uint32_t*) SK_OVERRIDE; 69 const SkBitmap* justAnOpaqueColor(uint32_t*) override;
70 70
71 protected: 71 protected:
72 SkPMColor fSrcColor32; 72 SkPMColor fSrcColor32;
73 uint32_t fExpandedRaw16; 73 uint32_t fExpandedRaw16;
74 unsigned fScale; 74 unsigned fScale;
75 uint16_t fColor16; // already scaled by fScale 75 uint16_t fColor16; // already scaled by fScale
76 uint16_t fRawColor16; // unscaled 76 uint16_t fRawColor16; // unscaled
77 uint16_t fRawDither16; // unscaled 77 uint16_t fRawDither16; // unscaled
78 SkBool8 fDoDither; 78 SkBool8 fDoDither;
79 79
80 SkBlitRow::ColorProc16 fColorProc16; 80 SkBlitRow::ColorProc16 fColorProc16;
81 81
82 // illegal 82 // illegal
83 SkRGB16_Blitter& operator=(const SkRGB16_Blitter&); 83 SkRGB16_Blitter& operator=(const SkRGB16_Blitter&);
84 84
85 typedef SkRasterBlitter INHERITED; 85 typedef SkRasterBlitter INHERITED;
86 }; 86 };
87 87
88 class SkRGB16_Opaque_Blitter : public SkRGB16_Blitter { 88 class SkRGB16_Opaque_Blitter : public SkRGB16_Blitter {
89 public: 89 public:
90 SkRGB16_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint); 90 SkRGB16_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint);
91 void blitH(int x, int y, int width) SK_OVERRIDE; 91 void blitH(int x, int y, int width) override;
92 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 92 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
93 const int16_t* runs) SK_OVERRIDE; 93 const int16_t* runs) override;
94 void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; 94 void blitV(int x, int y, int height, SkAlpha alpha) override;
95 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 95 void blitRect(int x, int y, int width, int height) override;
96 virtual void blitMask(const SkMask&, 96 virtual void blitMask(const SkMask&,
97 const SkIRect&) SK_OVERRIDE; 97 const SkIRect&) override;
98 98
99 private: 99 private:
100 typedef SkRGB16_Blitter INHERITED; 100 typedef SkRGB16_Blitter INHERITED;
101 }; 101 };
102 102
103 #ifdef USE_BLACK_BLITTER 103 #ifdef USE_BLACK_BLITTER
104 class SkRGB16_Black_Blitter : public SkRGB16_Opaque_Blitter { 104 class SkRGB16_Black_Blitter : public SkRGB16_Opaque_Blitter {
105 public: 105 public:
106 SkRGB16_Black_Blitter(const SkBitmap& device, const SkPaint& paint); 106 SkRGB16_Black_Blitter(const SkBitmap& device, const SkPaint& paint);
107 void blitMask(const SkMask&, const SkIRect&) SK_OVERRIDE; 107 void blitMask(const SkMask&, const SkIRect&) override;
108 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 108 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
109 const int16_t* runs) SK_OVERRIDE; 109 const int16_t* runs) override;
110 110
111 private: 111 private:
112 typedef SkRGB16_Opaque_Blitter INHERITED; 112 typedef SkRGB16_Opaque_Blitter INHERITED;
113 }; 113 };
114 #endif 114 #endif
115 115
116 class SkRGB16_Shader_Blitter : public SkShaderBlitter { 116 class SkRGB16_Shader_Blitter : public SkShaderBlitter {
117 public: 117 public:
118 SkRGB16_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, 118 SkRGB16_Shader_Blitter(const SkBitmap& device, const SkPaint& paint,
119 SkShader::Context* shaderContext); 119 SkShader::Context* shaderContext);
120 virtual ~SkRGB16_Shader_Blitter(); 120 virtual ~SkRGB16_Shader_Blitter();
121 void blitH(int x, int y, int width) SK_OVERRIDE; 121 void blitH(int x, int y, int width) override;
122 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 122 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
123 const int16_t* runs) SK_OVERRIDE; 123 const int16_t* runs) override;
124 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 124 void blitRect(int x, int y, int width, int height) override;
125 125
126 protected: 126 protected:
127 SkPMColor* fBuffer; 127 SkPMColor* fBuffer;
128 SkBlitRow::Proc16 fOpaqueProc; 128 SkBlitRow::Proc16 fOpaqueProc;
129 SkBlitRow::Proc16 fAlphaProc; 129 SkBlitRow::Proc16 fAlphaProc;
130 130
131 private: 131 private:
132 // illegal 132 // illegal
133 SkRGB16_Shader_Blitter& operator=(const SkRGB16_Shader_Blitter&); 133 SkRGB16_Shader_Blitter& operator=(const SkRGB16_Shader_Blitter&);
134 134
135 typedef SkShaderBlitter INHERITED; 135 typedef SkShaderBlitter INHERITED;
136 }; 136 };
137 137
138 // used only if the shader can perform shadSpan16 138 // used only if the shader can perform shadSpan16
139 class SkRGB16_Shader16_Blitter : public SkRGB16_Shader_Blitter { 139 class SkRGB16_Shader16_Blitter : public SkRGB16_Shader_Blitter {
140 public: 140 public:
141 SkRGB16_Shader16_Blitter(const SkBitmap& device, const SkPaint& paint, 141 SkRGB16_Shader16_Blitter(const SkBitmap& device, const SkPaint& paint,
142 SkShader::Context* shaderContext); 142 SkShader::Context* shaderContext);
143 void blitH(int x, int y, int width) SK_OVERRIDE; 143 void blitH(int x, int y, int width) override;
144 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 144 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
145 const int16_t* runs) SK_OVERRIDE; 145 const int16_t* runs) override;
146 void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 146 void blitRect(int x, int y, int width, int height) override;
147 147
148 private: 148 private:
149 typedef SkRGB16_Shader_Blitter INHERITED; 149 typedef SkRGB16_Shader_Blitter INHERITED;
150 }; 150 };
151 151
152 class SkRGB16_Shader_Xfermode_Blitter : public SkShaderBlitter { 152 class SkRGB16_Shader_Xfermode_Blitter : public SkShaderBlitter {
153 public: 153 public:
154 SkRGB16_Shader_Xfermode_Blitter(const SkBitmap& device, const SkPaint& paint , 154 SkRGB16_Shader_Xfermode_Blitter(const SkBitmap& device, const SkPaint& paint ,
155 SkShader::Context* shaderContext); 155 SkShader::Context* shaderContext);
156 virtual ~SkRGB16_Shader_Xfermode_Blitter(); 156 virtual ~SkRGB16_Shader_Xfermode_Blitter();
157 void blitH(int x, int y, int width) SK_OVERRIDE; 157 void blitH(int x, int y, int width) override;
158 virtual void blitAntiH(int x, int y, const SkAlpha* antialias, 158 virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
159 const int16_t* runs) SK_OVERRIDE; 159 const int16_t* runs) override;
160 160
161 private: 161 private:
162 SkXfermode* fXfermode; 162 SkXfermode* fXfermode;
163 SkPMColor* fBuffer; 163 SkPMColor* fBuffer;
164 uint8_t* fAAExpand; 164 uint8_t* fAAExpand;
165 165
166 // illegal 166 // illegal
167 SkRGB16_Shader_Xfermode_Blitter& operator=(const SkRGB16_Shader_Xfermode_Bli tter&); 167 SkRGB16_Shader_Xfermode_Blitter& operator=(const SkRGB16_Shader_Xfermode_Bli tter&);
168 168
169 typedef SkShaderBlitter INHERITED; 169 typedef SkShaderBlitter INHERITED;
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 #endif 1054 #endif
1055 } else if (0xFF == SkColorGetA(color)) { 1055 } else if (0xFF == SkColorGetA(color)) {
1056 blitter = allocator->createT<SkRGB16_Opaque_Blitter>(device, paint); 1056 blitter = allocator->createT<SkRGB16_Opaque_Blitter>(device, paint);
1057 } else { 1057 } else {
1058 blitter = allocator->createT<SkRGB16_Blitter>(device, paint); 1058 blitter = allocator->createT<SkRGB16_Blitter>(device, paint);
1059 } 1059 }
1060 } 1060 }
1061 1061
1062 return blitter; 1062 return blitter;
1063 } 1063 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698