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

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

Issue 413403005: Pass clip blitter rows preserved request (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SK_OVERRIDE Created 6 years, 4 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 | « no previous file | no next file » | 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 #ifndef SkBlitter_DEFINED 10 #ifndef SkBlitter_DEFINED
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 virtual void blitH(int x, int y, int width) SK_OVERRIDE; 144 virtual void blitH(int x, int y, int width) SK_OVERRIDE;
145 virtual void blitAntiH(int x, int y, const SkAlpha[], 145 virtual void blitAntiH(int x, int y, const SkAlpha[],
146 const int16_t runs[]) SK_OVERRIDE; 146 const int16_t runs[]) SK_OVERRIDE;
147 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; 147 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
148 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 148 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
149 virtual void blitAntiRect(int x, int y, int width, int height, 149 virtual void blitAntiRect(int x, int y, int width, int height,
150 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE; 150 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE;
151 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; 151 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE;
152 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; 152 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE;
153 153
154 virtual int requestRowsPreserved() const SK_OVERRIDE {
155 return fBlitter->requestRowsPreserved();
156 }
157
154 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE { 158 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE {
155 return fBlitter->allocBlitMemory(sz); 159 return fBlitter->allocBlitMemory(sz);
156 } 160 }
157 161
158 private: 162 private:
159 SkBlitter* fBlitter; 163 SkBlitter* fBlitter;
160 SkIRect fClipRect; 164 SkIRect fClipRect;
161 }; 165 };
162 166
163 /** Wraps another (real) blitter, and ensures that the real blitter is only 167 /** Wraps another (real) blitter, and ensures that the real blitter is only
(...skipping 11 matching lines...) Expand all
175 virtual void blitH(int x, int y, int width) SK_OVERRIDE; 179 virtual void blitH(int x, int y, int width) SK_OVERRIDE;
176 virtual void blitAntiH(int x, int y, const SkAlpha[], 180 virtual void blitAntiH(int x, int y, const SkAlpha[],
177 const int16_t runs[]) SK_OVERRIDE; 181 const int16_t runs[]) SK_OVERRIDE;
178 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; 182 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
179 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE; 183 virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE;
180 virtual void blitAntiRect(int x, int y, int width, int height, 184 virtual void blitAntiRect(int x, int y, int width, int height,
181 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE; 185 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE;
182 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; 186 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE;
183 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; 187 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE;
184 188
189 virtual int requestRowsPreserved() const SK_OVERRIDE {
190 return fBlitter->requestRowsPreserved();
191 }
192
185 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE { 193 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE {
186 return fBlitter->allocBlitMemory(sz); 194 return fBlitter->allocBlitMemory(sz);
187 } 195 }
188 196
189 private: 197 private:
190 SkBlitter* fBlitter; 198 SkBlitter* fBlitter;
191 const SkRegion* fRgn; 199 const SkRegion* fRgn;
192 }; 200 };
193 201
194 /** Factory to set up the appropriate most-efficient wrapper blitter 202 /** Factory to set up the appropriate most-efficient wrapper blitter
195 to apply a clip. Returns a pointer to a member, so lifetime must 203 to apply a clip. Returns a pointer to a member, so lifetime must
196 be managed carefully. 204 be managed carefully.
197 */ 205 */
198 class SkBlitterClipper { 206 class SkBlitterClipper {
199 public: 207 public:
200 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip, 208 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip,
201 const SkIRect* bounds = NULL); 209 const SkIRect* bounds = NULL);
202 210
203 private: 211 private:
204 SkNullBlitter fNullBlitter; 212 SkNullBlitter fNullBlitter;
205 SkRectClipBlitter fRectBlitter; 213 SkRectClipBlitter fRectBlitter;
206 SkRgnClipBlitter fRgnBlitter; 214 SkRgnClipBlitter fRgnBlitter;
207 }; 215 };
208 216
209 #endif 217 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698