diff options
-rw-r--r-- | include/core/SkColorFilter.h | 8 | ||||
-rw-r--r-- | include/core/SkXfermode.h | 17 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 8 |
3 files changed, 22 insertions, 11 deletions
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) diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 04c90cee92..f95c44343d 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -150,15 +150,15 @@ static bool needs_deep_copy(const SkPaint& paint) { /* * These fields are known to be immutable, and so can be shallow-copied * - * getTypeface(); - * getAnnotation(); - * getXfermode(); + * getTypeface() + * getAnnotation() + * paint.getColorFilter() + * getXfermode() */ return paint.getPathEffect() || paint.getShader() || paint.getMaskFilter() || - paint.getColorFilter() || paint.getRasterizer() || paint.getLooper() || paint.getImageFilter(); |