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

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

Issue 207683004: Extract most of the mutable state of SkShader into a separate Context object. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 6 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 */ 54 */
55 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value); 55 virtual const SkBitmap* justAnOpaqueColor(uint32_t* value);
56 56
57 /** 57 /**
58 * Special method just to identify the null blitter, which is returned 58 * Special method just to identify the null blitter, which is returned
59 * from Choose() if the request cannot be fulfilled. Default impl 59 * from Choose() if the request cannot be fulfilled. Default impl
60 * returns false. 60 * returns false.
61 */ 61 */
62 virtual bool isNullBlitter() const; 62 virtual bool isNullBlitter() const;
63 63
64 /**
65 * Special method for SkShaderBlitter. On all other classes this is a no-op .
66 */
67 virtual bool resetShaderContext(const SkBitmap& device, const SkPaint& paint ,
68 const SkMatrix& matrix);
69
64 ///@name non-virtual helpers 70 ///@name non-virtual helpers
65 void blitMaskRegion(const SkMask& mask, const SkRegion& clip); 71 void blitMaskRegion(const SkMask& mask, const SkRegion& clip);
66 void blitRectRegion(const SkIRect& rect, const SkRegion& clip); 72 void blitRectRegion(const SkIRect& rect, const SkRegion& clip);
67 void blitRegion(const SkRegion& clip); 73 void blitRegion(const SkRegion& clip);
68 ///@} 74 ///@}
69 75
70 /** @name Factories 76 /** @name Factories
71 Return the correct blitter to use given the specified context. 77 Return the correct blitter to use given the specified context.
72 */ 78 */
73 static SkBlitter* Choose(const SkBitmap& device, 79 static SkBlitter* Choose(const SkBitmap& device,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip, 169 SkBlitter* apply(SkBlitter* blitter, const SkRegion* clip,
164 const SkIRect* bounds = NULL); 170 const SkIRect* bounds = NULL);
165 171
166 private: 172 private:
167 SkNullBlitter fNullBlitter; 173 SkNullBlitter fNullBlitter;
168 SkRectClipBlitter fRectBlitter; 174 SkRectClipBlitter fRectBlitter;
169 SkRgnClipBlitter fRgnBlitter; 175 SkRgnClipBlitter fRgnBlitter;
170 }; 176 };
171 177
172 #endif 178 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698