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

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

Issue 1585813004: SkValue: SkXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: space Created 4 years, 11 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 | « gyp/effects.gypi ('k') | include/effects/SkLerpXfermode.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 GrTexture; 17 class GrTexture;
18 class GrXPFactory; 18 class GrXPFactory;
19 class SkString; 19 class SkString;
20 class SkValue;
20 21
21 /** \class SkXfermode 22 /** \class SkXfermode
22 * 23 *
23 * 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
24 * "transfer-modes" in the drawing pipeline. The static function Create(Modes) 25 * "transfer-modes" in the drawing pipeline. The static function Create(Modes)
25 * 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
26 * 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,
27 * then objects drawn with that paint have the xfermode applied. 28 * then objects drawn with that paint have the xfermode applied.
28 * 29 *
29 * 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
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 This method will not be called directly by the client, so it need not 240 This method will not be called directly by the client, so it need not
240 be implemented if your subclass has overridden xfer32/xfer16/xferA8 241 be implemented if your subclass has overridden xfer32/xfer16/xferA8
241 */ 242 */
242 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const; 243 virtual SkPMColor xferColor(SkPMColor src, SkPMColor dst) const;
243 244
244 private: 245 private:
245 enum { 246 enum {
246 kModeCount = kLastMode + 1 247 kModeCount = kLastMode + 1
247 }; 248 };
248 249
250 template<typename T> friend SkValue SkToValue(const T*);
251 virtual SkValue asValue() const;
252
249 typedef SkFlattenable INHERITED; 253 typedef SkFlattenable INHERITED;
250 }; 254 };
251 255
252 #endif 256 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | include/effects/SkLerpXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698