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

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

Issue 240533003: Orphan ProcXfermode, with an eye towards removing it (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: guard toString Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkXfermode.cpp » ('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 GrEffectRef; 16 class GrEffectRef;
17 class GrTexture; 17 class GrTexture;
18 class SkString; 18 class SkString;
19 19
20 //#define SK_SUPPORT_LEGACY_PROCXFERMODE
21
20 /** \class SkXfermode 22 /** \class SkXfermode
21 * 23 *
22 * SkXfermode is the base class for objects that are called to implement custom 24 * SkXfermode is the base class for objects that are called to implement custom
23 * "transfer-modes" in the drawing pipeline. The static function Create(Modes) 25 * "transfer-modes" in the drawing pipeline. The static function Create(Modes)
24 * can be called to return an instance of any of the predefined subclasses as 26 * can be called to return an instance of any of the predefined subclasses as
25 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, 27 * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint,
26 * then objects drawn with that paint have the xfermode applied. 28 * then objects drawn with that paint have the xfermode applied.
27 * 29 *
28 * All subclasses are required to be reentrant-safe : it must be legal to share 30 * All subclasses are required to be reentrant-safe : it must be legal to share
29 * the same instance between several threads. 31 * the same instance between several threads.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 }; 241 };
240 242
241 friend class SkGraphics; 243 friend class SkGraphics;
242 static void Term(); 244 static void Term();
243 245
244 typedef SkFlattenable INHERITED; 246 typedef SkFlattenable INHERITED;
245 }; 247 };
246 248
247 /////////////////////////////////////////////////////////////////////////////// 249 ///////////////////////////////////////////////////////////////////////////////
248 250
251 #ifdef SK_SUPPORT_LEGACY_PROCXFERMODE
249 /** \class SkProcXfermode 252 /** \class SkProcXfermode
250 253
251 SkProcXfermode is a xfermode that applies the specified proc to its colors. 254 SkProcXfermode is a xfermode that applies the specified proc to its colors.
252 This class is not exported to java. 255 This class is not exported to java.
253 */ 256 */
254 class SK_API SkProcXfermode : public SkXfermode { 257 class SK_API SkProcXfermode : public SkXfermode {
255 public: 258 public:
256 static SkProcXfermode* Create(SkXfermodeProc proc) { 259 static SkProcXfermode* Create(SkXfermodeProc proc) {
257 return SkNEW_ARGS(SkProcXfermode, (proc)); 260 return SkNEW_ARGS(SkProcXfermode, (proc));
258 } 261 }
(...skipping 25 matching lines...) Expand all
284 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS 287 #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
285 public: 288 public:
286 #endif 289 #endif
287 SkProcXfermode(SkXfermodeProc proc) : fProc(proc) {} 290 SkProcXfermode(SkXfermodeProc proc) : fProc(proc) {}
288 291
289 private: 292 private:
290 SkXfermodeProc fProc; 293 SkXfermodeProc fProc;
291 294
292 typedef SkXfermode INHERITED; 295 typedef SkXfermode INHERITED;
293 }; 296 };
297 #endif
294 298
295 #endif 299 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698