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

Side by Side Diff: include/core/SkXfermode.h

Issue 1388113002: Bye bye processor data manager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove files Created 5 years, 2 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 | « include/core/SkShader.h ('k') | include/effects/SkColorCubeFilter.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 #ifndef SkXfermode_DEFINED 10 #ifndef SkXfermode_DEFINED
11 #define SkXfermode_DEFINED 11 #define SkXfermode_DEFINED
12 12
13 #include "SkFlattenable.h" 13 #include "SkFlattenable.h"
14 #include "SkColor.h" 14 #include "SkColor.h"
15 15
16 class GrFragmentProcessor; 16 class GrFragmentProcessor;
17 class GrProcessorDataManager;
18 class GrTexture; 17 class GrTexture;
19 class GrXPFactory; 18 class GrXPFactory;
20 class SkString; 19 class SkString;
21 20
22 /** \class SkXfermode 21 /** \class SkXfermode
23 * 22 *
24 * SkXfermode is the base class for objects that are called to implement custom 23 * SkXfermode is the base class for objects that are called to implement custom
25 * "transfer-modes" in the drawing pipeline. The static function Create(Modes) 24 * "transfer-modes" in the drawing pipeline. The static function Create(Modes)
26 * can be called to return an instance of any of the predefined subclasses as 25 * can be called to return an instance of any of the predefined subclasses as
27 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, 26 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint,
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 */ 193 */
195 static bool IsOpaque(const SkXfermode* xfer, SrcColorOpacity opacityType); 194 static bool IsOpaque(const SkXfermode* xfer, SrcColorOpacity opacityType);
196 195
197 /** Used to do in-shader blending between two colors computed in the shader via a 196 /** Used to do in-shader blending between two colors computed in the shader via a
198 GrFragmentProcessor. The input to the returned FP is the src color. The dst color is 197 GrFragmentProcessor. The input to the returned FP is the src color. The dst color is
199 provided by the dst param which becomes a child FP of the returned FP. I f the params are 198 provided by the dst param which becomes a child FP of the returned FP. I f the params are
200 null then this is just a query of whether the SkXfermode could support t his functionality. 199 null then this is just a query of whether the SkXfermode could support t his functionality.
201 It is legal for the function to succeed but return a null output. This i ndicates that 200 It is legal for the function to succeed but return a null output. This i ndicates that
202 the output of the blend is simply the src color. 201 the output of the blend is simply the src color.
203 */ 202 */
204 virtual bool asFragmentProcessor(const GrFragmentProcessor** output, GrProce ssorDataManager*, 203 virtual bool asFragmentProcessor(const GrFragmentProcessor** output,
205 const GrFragmentProcessor* dst) const; 204 const GrFragmentProcessor* dst) const;
206 205
207 /** A subclass may implement this factory function to work with the GPU back end. It is legal 206 /** A subclass may implement this factory function to work with the GPU back end. It is legal
208 to call this with xpf NULL to simply test the return value. If xpf is no n-NULL then the 207 to call this with xpf NULL to simply test the return value. If xpf is no n-NULL then the
209 xfermode may optionally allocate a factory to return to the caller as *x pf. The caller 208 xfermode may optionally allocate a factory to return to the caller as *x pf. The caller
210 will install it and own a ref to it. Since the xfermode may or may not a ssign *xpf, the 209 will install it and own a ref to it. Since the xfermode may or may not a ssign *xpf, the
211 caller should set *xpf to NULL beforehand. XferProcessors cannot use a b ackground texture. 210 caller should set *xpf to NULL beforehand. XferProcessors cannot use a b ackground texture.
212 */ 211 */
213 virtual bool asXPFactory(GrXPFactory** xpf) const; 212 virtual bool asXPFactory(GrXPFactory** xpf) const;
214 213
(...skipping 21 matching lines...) Expand all
236 235
237 private: 236 private:
238 enum { 237 enum {
239 kModeCount = kLastMode + 1 238 kModeCount = kLastMode + 1
240 }; 239 };
241 240
242 typedef SkFlattenable INHERITED; 241 typedef SkFlattenable INHERITED;
243 }; 242 };
244 243
245 #endif 244 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | include/effects/SkColorCubeFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698