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

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

Issue 1078413003: Speeup hairline curves (quads and cubics) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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_ARGB32.cpp ('k') | src/core/SkGeometry.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 class SkARGB32_Blitter : public SkRasterBlitter { 114 class SkARGB32_Blitter : public SkRasterBlitter {
115 public: 115 public:
116 SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint); 116 SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint);
117 virtual void blitH(int x, int y, int width); 117 virtual void blitH(int x, int y, int width);
118 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 118 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]);
119 virtual void blitV(int x, int y, int height, SkAlpha alpha); 119 virtual void blitV(int x, int y, int height, SkAlpha alpha);
120 virtual void blitRect(int x, int y, int width, int height); 120 virtual void blitRect(int x, int y, int width, int height);
121 virtual void blitMask(const SkMask&, const SkIRect&); 121 virtual void blitMask(const SkMask&, const SkIRect&);
122 virtual const SkBitmap* justAnOpaqueColor(uint32_t*); 122 virtual const SkBitmap* justAnOpaqueColor(uint32_t*);
123 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
124 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
125 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
126 #endif
123 127
124 protected: 128 protected:
125 SkColor fColor; 129 SkColor fColor;
126 SkPMColor fPMColor; 130 SkPMColor fPMColor;
127 SkBlitRow::ColorProc fColor32Proc; 131 SkBlitRow::ColorProc fColor32Proc;
128 132
129 private: 133 private:
130 unsigned fSrcA, fSrcR, fSrcG, fSrcB; 134 unsigned fSrcA, fSrcR, fSrcG, fSrcB;
131 135
132 // illegal 136 // illegal
133 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&); 137 SkARGB32_Blitter& operator=(const SkARGB32_Blitter&);
134 138
135 typedef SkRasterBlitter INHERITED; 139 typedef SkRasterBlitter INHERITED;
136 }; 140 };
137 141
138 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter { 142 class SkARGB32_Opaque_Blitter : public SkARGB32_Blitter {
139 public: 143 public:
140 SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint) 144 SkARGB32_Opaque_Blitter(const SkBitmap& device, const SkPaint& paint)
141 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); } 145 : INHERITED(device, paint) { SkASSERT(paint.getAlpha() == 0xFF); }
142 virtual void blitMask(const SkMask&, const SkIRect&); 146 virtual void blitMask(const SkMask&, const SkIRect&);
147 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
148 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
149 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
150 #endif
143 151
144 private: 152 private:
145 typedef SkARGB32_Blitter INHERITED; 153 typedef SkARGB32_Blitter INHERITED;
146 }; 154 };
147 155
148 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter { 156 class SkARGB32_Black_Blitter : public SkARGB32_Opaque_Blitter {
149 public: 157 public:
150 SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint) 158 SkARGB32_Black_Blitter(const SkBitmap& device, const SkPaint& paint)
151 : INHERITED(device, paint) {} 159 : INHERITED(device, paint) {}
152 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]); 160 virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_ t runs[]);
161 #ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2
162 void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) override;
163 void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) override;
164 #endif
153 165
154 private: 166 private:
155 typedef SkARGB32_Opaque_Blitter INHERITED; 167 typedef SkARGB32_Opaque_Blitter INHERITED;
156 }; 168 };
157 169
158 class SkARGB32_Shader_Blitter : public SkShaderBlitter { 170 class SkARGB32_Shader_Blitter : public SkShaderBlitter {
159 public: 171 public:
160 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint, 172 SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint,
161 SkShader::Context* shaderContext); 173 SkShader::Context* shaderContext);
162 virtual ~SkARGB32_Shader_Blitter(); 174 virtual ~SkARGB32_Shader_Blitter();
(...skipping 30 matching lines...) Expand all
193 205
194 These pre-conditions must be handled by the caller, in our case 206 These pre-conditions must be handled by the caller, in our case
195 SkBlitter::Choose(...) 207 SkBlitter::Choose(...)
196 */ 208 */
197 209
198 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, 210 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint,
199 SkShader::Context* shaderContext, 211 SkShader::Context* shaderContext,
200 SkTBlitterAllocator* allocator); 212 SkTBlitterAllocator* allocator);
201 213
202 #endif 214 #endif
OLDNEW
« no previous file with comments | « src/core/SkBlitter_ARGB32.cpp ('k') | src/core/SkGeometry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698