From fb6deed66c20f86c86c105f41dbbf3f3c4a47e4c Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 10 Oct 2013 17:35:58 +0000 Subject: make explicit the requirement that all colorfilters are reentrant-safe BUG= R=mtklein@google.com Review URL: https://codereview.chromium.org/26876002 git-svn-id: http://skia.googlecode.com/svn/trunk@11705 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkColorFilter.h | 8 ++++++++ include/core/SkXfermode.h | 17 ++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) (limited to 'include/core') diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h index 6359563d51..46ecedc6df 100644 --- a/include/core/SkColorFilter.h +++ b/include/core/SkColorFilter.h @@ -18,6 +18,14 @@ class SkBitmap; class GrEffectRef; class GrContext; +/** + * ColorFilters are optional objects in the drawing pipeline. When present in + * a paint, they are called with the "src" colors, and return new colors, which + * are then passed onto the next stage (either ImageFilter or Xfermode). + * + * All subclasses are required to be reentrant-safe : it must be legal to share + * the same instance between several threads. + */ class SK_API SkColorFilter : public SkFlattenable { public: SK_DECLARE_INST_COUNT(SkColorFilter) diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h index ed07bd5821..f4df226950 100644 --- a/include/core/SkXfermode.h +++ b/include/core/SkXfermode.h @@ -19,13 +19,16 @@ class GrTexture; class SkString; /** \class SkXfermode - - SkXfermode is the base class for objects that are called to implement custom - "transfer-modes" in the drawing pipeline. The static function Create(Modes) - can be called to return an instance of any of the predefined subclasses as - specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, - then objects drawn with that paint have the xfermode applied. -*/ + * + * SkXfermode is the base class for objects that are called to implement custom + * "transfer-modes" in the drawing pipeline. The static function Create(Modes) + * can be called to return an instance of any of the predefined subclasses as + * specified in the Modes enum. When an SkXfermode is assigned to an SkPaint, + * then objects drawn with that paint have the xfermode applied. + * + * All subclasses are required to be reentrant-safe : it must be legal to share + * the same instance between several threads. + */ class SK_API SkXfermode : public SkFlattenable { public: SK_DECLARE_INST_COUNT(SkXfermode) -- cgit v1.2.3