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

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

Issue 26876002: make explicit the requirement that all colorfilters are reentrant-safe (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 GrContext; 16 class GrContext;
17 class GrEffectRef; 17 class GrEffectRef;
18 class GrTexture; 18 class GrTexture;
19 class SkString; 19 class SkString;
20 20
21 /** \class SkXfermode 21 /** \class SkXfermode
22 22
23 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
mtklein 2013/10/10 17:33:14 add some stars up here?
24 "transfer-modes" in the drawing pipeline. The static function Create(Modes) 24 "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 25 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, 26 specified in the Modes enum. When an SkXfermode is assigned to an SkPaint,
27 then objects drawn with that paint have the xfermode applied. 27 then objects drawn with that paint have the xfermode applied.
28 */ 28
29 * All subclasses are required to be reentrant-safe : it must be legal to share
30 * the same instance between several threads.
31 */
29 class SK_API SkXfermode : public SkFlattenable { 32 class SK_API SkXfermode : public SkFlattenable {
30 public: 33 public:
31 SK_DECLARE_INST_COUNT(SkXfermode) 34 SK_DECLARE_INST_COUNT(SkXfermode)
32 35
33 SkXfermode() {} 36 SkXfermode() {}
34 37
35 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 38 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count,
36 const SkAlpha aa[]) const; 39 const SkAlpha aa[]) const;
37 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, 40 virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
38 const SkAlpha aa[]) const; 41 const SkAlpha aa[]) const;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 return fProc; 282 return fProc;
280 } 283 }
281 284
282 private: 285 private:
283 SkXfermodeProc fProc; 286 SkXfermodeProc fProc;
284 287
285 typedef SkXfermode INHERITED; 288 typedef SkXfermode INHERITED;
286 }; 289 };
287 290
288 #endif 291 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698