aboutsummaryrefslogtreecommitdiffstats
path: root/include/effects/SkLayerDrawLooper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/effects/SkLayerDrawLooper.h')
-rw-r--r--include/effects/SkLayerDrawLooper.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h
index 8627ae4..697d7b2 100644
--- a/include/effects/SkLayerDrawLooper.h
+++ b/include/effects/SkLayerDrawLooper.h
@@ -1,3 +1,10 @@
+
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef SkLayerDrawLooper_DEFINED
#define SkLayerDrawLooper_DEFINED
@@ -15,7 +22,8 @@ public:
* Bits specifies which aspects of the layer's paint should replace the
* corresponding aspects on the draw's paint.
* kEntirePaint_Bits means use the layer's paint completely.
- * 0 means ignore the layer's paint.
+ * 0 means ignore the layer's paint... except that LayerInfo's fFlagsMask
+ * and fColorMode are always applied.
*/
enum Bits {
kStyle_Bit = 1 << 0, //!< use this layer's Style/stroke settings
@@ -26,7 +34,15 @@ public:
kColorFilter_Bit = 1 << 5, //!< use this layer's colorfilter
kXfermode_Bit = 1 << 6, //!< use this layer's xfermode
- kEntirePaint_Bits = -1, //!< use this layer's paint entirely
+ /**
+ * Use the layer's paint entirely, with these exceptions:
+ * - We never override the draw's paint's text_encoding, since that is
+ * used to interpret the text/len parameters in draw[Pos]Text.
+ * - Flags and Color are always computed using the LayerInfo's
+ * fFlagsMask and fColorMode.
+ */
+ kEntirePaint_Bits = -1,
+
};
typedef int32_t BitFlags;
@@ -90,6 +106,8 @@ public:
return SkNEW_ARGS(SkLayerDrawLooper, (buffer));
}
+ SK_DECLARE_FLATTENABLE_REGISTRAR()
+
protected:
SkLayerDrawLooper(SkFlattenableReadBuffer&);