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

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: 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
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
robertphillips 2014/07/29 12:37:53 override ?
krajcevski 2014/07/29 14:09:03 Done.
154 virtual int requestRowsPreserved() const { return fBlitter->requestRowsPrese rved(); }
154 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE { 155 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE {
155 return fBlitter->allocBlitMemory(sz); 156 return fBlitter->allocBlitMemory(sz);
156 } 157 }
157 158
158 private: 159 private:
159 SkBlitter* fBlitter; 160 SkBlitter* fBlitter;
160 SkIRect fClipRect; 161 SkIRect fClipRect;
161 }; 162 };
162 163
163 /** Wraps another (real) blitter, and ensures that the real blitter is only 164 /** Wraps another (real) blitter, and ensures that the real blitter is only
(...skipping 10 matching lines...) Expand all
174 175
175 virtual void blitH(int x, int y, int width) SK_OVERRIDE; 176 virtual void blitH(int x, int y, int width) SK_OVERRIDE;
176 virtual void blitAntiH(int x, int y, const SkAlpha[], 177 virtual void blitAntiH(int x, int y, const SkAlpha[],
177 const int16_t runs[]) SK_OVERRIDE; 178 const int16_t runs[]) SK_OVERRIDE;
178 virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE; 179 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; 180 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, 181 virtual void blitAntiRect(int x, int y, int width, int height,
181 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE; 182 SkAlpha leftAlpha, SkAlpha rightAlpha) SK_OVERRIDE;
182 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE; 183 virtual void blitMask(const SkMask&, const SkIRect& clip) SK_OVERRIDE;
183 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE; 184 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value) SK_OVERRIDE;
184 185
robertphillips 2014/07/29 12:37:53 override ?
krajcevski 2014/07/29 14:09:03 Done.
186 virtual int requestRowsPreserved() const { return fBlitter->requestRowsPrese rved(); }
185 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE { 187 virtual void* allocBlitMemory(size_t sz) SK_OVERRIDE {
186 return fBlitter->allocBlitMemory(sz); 188 return fBlitter->allocBlitMemory(sz);
187 } 189 }
188 190
189 private: 191 private:
190 SkBlitter* fBlitter; 192 SkBlitter* fBlitter;
191 const SkRegion* fRgn; 193 const SkRegion* fRgn;
192 }; 194 };
193 195
194 /** Factory to set up the appropriate most-efficient wrapper blitter 196 /** Factory to set up the appropriate most-efficient wrapper blitter
195 to apply a clip. Returns a pointer to a member, so lifetime must 197 to apply a clip. Returns a pointer to a member, so lifetime must
196 be managed carefully. 198 be managed carefully.
197 */ 199 */
198 class SkBlitterClipper { 200 class SkBlitterClipper {
199 public: 201 public:
200 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip, 202 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip,
201 const SkIRect* bounds = NULL); 203 const SkIRect* bounds = NULL);
202 204
203 private: 205 private:
204 SkNullBlitter fNullBlitter; 206 SkNullBlitter fNullBlitter;
205 SkRectClipBlitter fRectBlitter; 207 SkRectClipBlitter fRectBlitter;
206 SkRgnClipBlitter fRgnBlitter; 208 SkRgnClipBlitter fRgnBlitter;
207 }; 209 };
208 210
209 #endif 211 #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