aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/SkPictureFlat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkPictureFlat.h')
-rw-r--r--src/core/SkPictureFlat.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h
index 4db61f7..983bfc5 100644
--- a/src/core/SkPictureFlat.h
+++ b/src/core/SkPictureFlat.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 SkPictureFlat_DEFINED
#define SkPictureFlat_DEFINED
@@ -17,6 +24,7 @@ enum DrawType {
CONCAT,
DRAW_BITMAP,
DRAW_BITMAP_MATRIX,
+ DRAW_BITMAP_NINE,
DRAW_BITMAP_RECT,
DRAW_CLEAR,
DRAW_DATA,
@@ -29,7 +37,6 @@ enum DrawType {
DRAW_POS_TEXT_H,
DRAW_POS_TEXT_H_TOP_BOTTOM, // fast variant of DRAW_POS_TEXT_H
DRAW_RECT,
- DRAW_SHAPE,
DRAW_SPRITE,
DRAW_TEXT,
DRAW_TEXT_ON_PATH,
@@ -51,6 +58,25 @@ enum DrawVertexFlags {
DRAW_VERTICES_HAS_INDICES = 0x04
};
+///////////////////////////////////////////////////////////////////////////////
+// clipparams are packed in 5 bits
+// doAA:1 | regionOp:4
+
+static inline uint32_t ClipParams_pack(SkRegion::Op op, bool doAA) {
+ unsigned doAABit = doAA ? 1 : 0;
+ return (doAABit << 4) | op;
+}
+
+static inline SkRegion::Op ClipParams_unpackRegionOp(uint32_t packed) {
+ return (SkRegion::Op)(packed & 0xF);
+}
+
+static inline bool ClipParams_unpackDoAA(uint32_t packed) {
+ return SkToBool((packed >> 4) & 1);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
class SkRefCntPlayback {
public:
SkRefCntPlayback();