epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 2 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 3 | * Copyright 2011 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 10 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 11 | #ifndef SkGPipePriv_DEFINED |
| 12 | #define SkGPipePriv_DEFINED |
| 13 | |
| 14 | #include "SkTypes.h" |
| 15 | |
| 16 | #define UNIMPLEMENTED |
| 17 | |
reed@google.com | b55d118 | 2011-05-11 00:42:04 +0000 | [diff] [blame] | 18 | // these must be contiguous, 0...N-1 |
| 19 | enum PaintFlats { |
| 20 | kColorFilter_PaintFlat, |
reed@google.com | 0faac1e | 2011-05-11 05:58:58 +0000 | [diff] [blame] | 21 | kDrawLooper_PaintFlat, |
reed@google.com | 3534822 | 2013-10-16 13:05:06 +0000 | [diff] [blame] | 22 | kImageFilter_PaintFlat, |
reed@google.com | b55d118 | 2011-05-11 00:42:04 +0000 | [diff] [blame] | 23 | kMaskFilter_PaintFlat, |
| 24 | kPathEffect_PaintFlat, |
| 25 | kRasterizer_PaintFlat, |
| 26 | kShader_PaintFlat, |
| 27 | kXfermode_PaintFlat, |
| 28 | |
reed@google.com | 0cd2ac6 | 2013-10-14 20:02:44 +0000 | [diff] [blame] | 29 | kLast_PaintFlat = kXfermode_PaintFlat |
reed@google.com | b55d118 | 2011-05-11 00:42:04 +0000 | [diff] [blame] | 30 | }; |
| 31 | #define kCount_PaintFlats (kLast_PaintFlat + 1) |
| 32 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 33 | enum DrawOps { |
reed@google.com | acd471f | 2011-05-03 21:26:46 +0000 | [diff] [blame] | 34 | kSkip_DrawOp, // skip an addition N bytes (N == data) |
| 35 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 36 | // these match Canvas apis |
| 37 | kClipPath_DrawOp, |
| 38 | kClipRegion_DrawOp, |
| 39 | kClipRect_DrawOp, |
reed@google.com | 4ed0fb7 | 2012-12-12 20:48:18 +0000 | [diff] [blame] | 40 | kClipRRect_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 41 | kConcat_DrawOp, |
| 42 | kDrawBitmap_DrawOp, |
| 43 | kDrawBitmapMatrix_DrawOp, |
scroggo@google.com | 16d1d0b | 2012-05-02 19:09:40 +0000 | [diff] [blame] | 44 | kDrawBitmapNine_DrawOp, |
reed@google.com | 7112173 | 2012-09-18 15:14:33 +0000 | [diff] [blame] | 45 | kDrawBitmapRectToRect_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 46 | kDrawClear_DrawOp, |
| 47 | kDrawData_DrawOp, |
commit-bot@chromium.org | ed9806f | 2014-02-21 02:32:36 +0000 | [diff] [blame] | 48 | kDrawDRRect_DrawOp, |
reed@google.com | 4ed0fb7 | 2012-12-12 20:48:18 +0000 | [diff] [blame] | 49 | kDrawOval_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 50 | kDrawPaint_DrawOp, |
dandov | 963137b | 2014-08-07 07:49:53 -0700 | [diff] [blame] | 51 | kDrawPatch_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 52 | kDrawPath_DrawOp, |
| 53 | kDrawPicture_DrawOp, |
| 54 | kDrawPoints_DrawOp, |
| 55 | kDrawPosText_DrawOp, |
| 56 | kDrawPosTextH_DrawOp, |
| 57 | kDrawRect_DrawOp, |
reed@google.com | 4ed0fb7 | 2012-12-12 20:48:18 +0000 | [diff] [blame] | 58 | kDrawRRect_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 59 | kDrawSprite_DrawOp, |
| 60 | kDrawText_DrawOp, |
| 61 | kDrawTextOnPath_DrawOp, |
| 62 | kDrawVertices_DrawOp, |
| 63 | kRestore_DrawOp, |
| 64 | kRotate_DrawOp, |
| 65 | kSave_DrawOp, |
| 66 | kSaveLayer_DrawOp, |
| 67 | kScale_DrawOp, |
| 68 | kSetMatrix_DrawOp, |
| 69 | kSkew_DrawOp, |
| 70 | kTranslate_DrawOp, |
| 71 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 72 | kPaintOp_DrawOp, |
scroggo@google.com | 3cb969f | 2012-07-27 20:39:19 +0000 | [diff] [blame] | 73 | kSetTypeface_DrawOp, |
reed@google.com | 0cd2ac6 | 2013-10-14 20:02:44 +0000 | [diff] [blame] | 74 | kSetAnnotation_DrawOp, |
reed@google.com | bb6793b | 2011-05-05 15:18:15 +0000 | [diff] [blame] | 75 | |
reed@google.com | bb6793b | 2011-05-05 15:18:15 +0000 | [diff] [blame] | 76 | kDef_Typeface_DrawOp, |
reed@google.com | 0faac1e | 2011-05-11 05:58:58 +0000 | [diff] [blame] | 77 | kDef_Flattenable_DrawOp, |
scroggo@google.com | 16d1d0b | 2012-05-02 19:09:40 +0000 | [diff] [blame] | 78 | kDef_Bitmap_DrawOp, |
scroggo@google.com | 0c3e5fe | 2012-08-01 19:34:20 +0000 | [diff] [blame] | 79 | kDef_Factory_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 80 | |
| 81 | // these are signals to playback, not drawing verbs |
scroggo@google.com | 565254b | 2012-06-28 15:41:32 +0000 | [diff] [blame] | 82 | kReportFlags_DrawOp, |
scroggo@google.com | d9d2967 | 2012-08-14 17:21:34 +0000 | [diff] [blame] | 83 | kShareBitmapHeap_DrawOp, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 84 | kDone_DrawOp, |
| 85 | }; |
| 86 | |
| 87 | /** |
| 88 | * DrawOp packs into a 32bit int as follows |
| 89 | * |
| 90 | * DrawOp:8 - Flags:4 - Data:20 |
| 91 | * |
| 92 | * Flags and Data are called out separately, so we can reuse Data between |
| 93 | * different Ops that might have different Flags. e.g. Data might be a Paint |
| 94 | * index for both drawRect (no flags) and saveLayer (does have flags). |
| 95 | * |
| 96 | * All Ops that take a SkPaint use their Data field to store the index to |
| 97 | * the paint (previously defined with kPaintOp_DrawOp). |
| 98 | */ |
| 99 | |
| 100 | #define DRAWOPS_OP_BITS 8 |
| 101 | #define DRAWOPS_FLAG_BITS 4 |
| 102 | #define DRAWOPS_DATA_BITS 20 |
| 103 | |
| 104 | #define DRAWOPS_OP_MASK ((1 << DRAWOPS_OP_BITS) - 1) |
| 105 | #define DRAWOPS_FLAG_MASK ((1 << DRAWOPS_FLAG_BITS) - 1) |
| 106 | #define DRAWOPS_DATA_MASK ((1 << DRAWOPS_DATA_BITS) - 1) |
| 107 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 108 | static inline unsigned DrawOp_unpackOp(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 109 | return (op32 >> (DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS)); |
| 110 | } |
| 111 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 112 | static inline unsigned DrawOp_unpackFlags(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 113 | return (op32 >> DRAWOPS_DATA_BITS) & DRAWOPS_FLAG_MASK; |
| 114 | } |
| 115 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 116 | static inline unsigned DrawOp_unpackData(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 117 | return op32 & DRAWOPS_DATA_MASK; |
| 118 | } |
| 119 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 120 | static inline uint32_t DrawOp_packOpFlagData(DrawOps op, unsigned flags, unsigned data) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 121 | SkASSERT(0 == (op & ~DRAWOPS_OP_MASK)); |
| 122 | SkASSERT(0 == (flags & ~DRAWOPS_FLAG_MASK)); |
| 123 | SkASSERT(0 == (data & ~DRAWOPS_DATA_MASK)); |
| 124 | |
reed@google.com | 67908f2 | 2011-06-27 14:47:50 +0000 | [diff] [blame] | 125 | return (op << (DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS)) | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 126 | (flags << DRAWOPS_DATA_BITS) | |
| 127 | data; |
| 128 | } |
| 129 | |
| 130 | /** DrawOp specific flag bits |
| 131 | */ |
| 132 | |
| 133 | enum { |
| 134 | kSaveLayer_HasBounds_DrawOpFlag = 1 << 0, |
| 135 | kSaveLayer_HasPaint_DrawOpFlag = 1 << 1, |
| 136 | }; |
| 137 | enum { |
| 138 | kClear_HasColor_DrawOpFlag = 1 << 0 |
| 139 | }; |
| 140 | enum { |
| 141 | kDrawTextOnPath_HasMatrix_DrawOpFlag = 1 << 0 |
| 142 | }; |
| 143 | enum { |
| 144 | kDrawVertices_HasTexs_DrawOpFlag = 1 << 0, |
| 145 | kDrawVertices_HasColors_DrawOpFlag = 1 << 1, |
| 146 | kDrawVertices_HasIndices_DrawOpFlag = 1 << 2, |
reed@google.com | 85e143c | 2013-12-30 15:51:25 +0000 | [diff] [blame] | 147 | kDrawVertices_HasXfermode_DrawOpFlag = 1 << 3, |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 148 | }; |
scroggo@google.com | 58be682 | 2012-07-30 14:40:01 +0000 | [diff] [blame] | 149 | enum { |
scroggo@google.com | 460a23e | 2012-08-16 17:56:49 +0000 | [diff] [blame] | 150 | kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, |
scroggo@google.com | 58be682 | 2012-07-30 14:40:01 +0000 | [diff] [blame] | 151 | // Specific to drawBitmapRect, but needs to be different from HasPaint, |
| 152 | // which is used for all drawBitmap calls, so include it here. |
scroggo@google.com | 460a23e | 2012-08-16 17:56:49 +0000 | [diff] [blame] | 153 | kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, |
skia.committer@gmail.com | 7475811 | 2013-08-17 07:01:54 +0000 | [diff] [blame] | 154 | // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is |
commit-bot@chromium.org | eed779d | 2013-08-16 10:24:37 +0000 | [diff] [blame] | 155 | // converted into and out of this flag to save space |
| 156 | kDrawBitmap_Bleed_DrawOpFlag = 1 << 2, |
scroggo@google.com | 58be682 | 2012-07-30 14:40:01 +0000 | [diff] [blame] | 157 | }; |
scroggo@google.com | 460a23e | 2012-08-16 17:56:49 +0000 | [diff] [blame] | 158 | enum { |
| 159 | kClip_HasAntiAlias_DrawOpFlag = 1 << 0, |
| 160 | }; |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 161 | /////////////////////////////////////////////////////////////////////////////// |
| 162 | |
scroggo@google.com | 284bf50 | 2012-07-17 16:10:34 +0000 | [diff] [blame] | 163 | class BitmapInfo : SkNoncopyable { |
| 164 | public: |
| 165 | BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) |
| 166 | : fBitmap(bitmap) |
| 167 | , fGenID(genID) |
scroggo@google.com | 15011ee | 2012-07-26 20:03:32 +0000 | [diff] [blame] | 168 | , fBytesAllocated(0) |
scroggo@google.com | 284bf50 | 2012-07-17 16:10:34 +0000 | [diff] [blame] | 169 | , fMoreRecentlyUsed(NULL) |
| 170 | , fLessRecentlyUsed(NULL) |
| 171 | , fToBeDrawnCount(toBeDrawnCount) |
| 172 | {} |
| 173 | |
| 174 | ~BitmapInfo() { |
| 175 | SkASSERT(0 == fToBeDrawnCount); |
| 176 | SkDELETE(fBitmap); |
| 177 | } |
| 178 | |
| 179 | void addDraws(int drawsToAdd) { |
| 180 | if (0 == fToBeDrawnCount) { |
| 181 | // The readers will only ever decrement the count, so once the |
| 182 | // count is zero, the writer will be the only one modifying it, |
| 183 | // so it does not need to be an atomic operation. |
| 184 | fToBeDrawnCount = drawsToAdd; |
| 185 | } else { |
| 186 | sk_atomic_add(&fToBeDrawnCount, drawsToAdd); |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | void decDraws() { |
| 191 | sk_atomic_dec(&fToBeDrawnCount); |
| 192 | } |
| 193 | |
| 194 | int drawCount() const { |
| 195 | return fToBeDrawnCount; |
| 196 | } |
| 197 | |
| 198 | SkBitmap* fBitmap; |
| 199 | // Store the generation ID of the original bitmap, since copying does |
| 200 | // not copy this field, so fBitmap's generation ID will not be useful |
| 201 | // for comparing. |
scroggo@google.com | 15011ee | 2012-07-26 20:03:32 +0000 | [diff] [blame] | 202 | // FIXME: Is it reasonable to make copying a bitmap/pixelref copy the |
| 203 | // generation ID? |
scroggo@google.com | 284bf50 | 2012-07-17 16:10:34 +0000 | [diff] [blame] | 204 | uint32_t fGenID; |
scroggo@google.com | 15011ee | 2012-07-26 20:03:32 +0000 | [diff] [blame] | 205 | // Keep track of the bytes allocated for this bitmap. When replacing the |
| 206 | // bitmap or removing this BitmapInfo we know how much memory has been |
| 207 | // reclaimed. |
| 208 | size_t fBytesAllocated; |
scroggo@google.com | 284bf50 | 2012-07-17 16:10:34 +0000 | [diff] [blame] | 209 | // TODO: Generalize the LRU caching mechanism |
| 210 | BitmapInfo* fMoreRecentlyUsed; |
| 211 | BitmapInfo* fLessRecentlyUsed; |
| 212 | private: |
| 213 | int fToBeDrawnCount; |
| 214 | }; |
| 215 | |
scroggo@google.com | 565254b | 2012-06-28 15:41:32 +0000 | [diff] [blame] | 216 | static inline bool shouldFlattenBitmaps(uint32_t flags) { |
scroggo@google.com | 3cb969f | 2012-07-27 20:39:19 +0000 | [diff] [blame] | 217 | return SkToBool(flags & SkGPipeWriter::kCrossProcess_Flag |
| 218 | && !(flags & SkGPipeWriter::kSharedAddressSpace_Flag)); |
scroggo@google.com | 565254b | 2012-06-28 15:41:32 +0000 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | /////////////////////////////////////////////////////////////////////////////// |
| 222 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 223 | enum PaintOps { |
| 224 | kReset_PaintOp, // no arg |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 225 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 226 | kFlags_PaintOp, // arg inline |
| 227 | kColor_PaintOp, // arg 32 |
commit-bot@chromium.org | 85faf50 | 2014-04-16 12:58:02 +0000 | [diff] [blame] | 228 | kFilterLevel_PaintOp, // arg inline |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 229 | kStyle_PaintOp, // arg inline |
| 230 | kJoin_PaintOp, // arg inline |
| 231 | kCap_PaintOp, // arg inline |
| 232 | kWidth_PaintOp, // arg scalar |
reed@google.com | 0cd2ac6 | 2013-10-14 20:02:44 +0000 | [diff] [blame] | 233 | kMiter_PaintOp, // arg scalar |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 234 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 235 | kEncoding_PaintOp, // arg inline - text |
| 236 | kHinting_PaintOp, // arg inline - text |
| 237 | kAlign_PaintOp, // arg inline - text |
| 238 | kTextSize_PaintOp, // arg scalar - text |
| 239 | kTextScaleX_PaintOp,// arg scalar - text |
| 240 | kTextSkewX_PaintOp, // arg scalar - text |
reed@google.com | f5842f7 | 2011-05-04 18:30:04 +0000 | [diff] [blame] | 241 | kTypeface_PaintOp, // arg inline (index) - text |
| 242 | |
reed@google.com | b55d118 | 2011-05-11 00:42:04 +0000 | [diff] [blame] | 243 | kFlatIndex_PaintOp, // flags=paintflat, data=index |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 244 | }; |
| 245 | |
| 246 | #define PAINTOPS_OP_BITS 8 |
| 247 | #define PAINTOPS_FLAG_BITS 4 |
| 248 | #define PAINTOPS_DATA_BITS 20 |
| 249 | |
| 250 | #define PAINTOPS_OP_MASK ((1 << PAINTOPS_OP_BITS) - 1) |
| 251 | #define PAINTOPS_FLAG_MASK ((1 << PAINTOPS_FLAG_BITS) - 1) |
| 252 | #define PAINTOPS_DATA_MASK ((1 << PAINTOPS_DATA_BITS) - 1) |
| 253 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 254 | static inline unsigned PaintOp_unpackOp(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 255 | return (op32 >> (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)); |
| 256 | } |
| 257 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 258 | static inline unsigned PaintOp_unpackFlags(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 259 | return (op32 >> PAINTOPS_DATA_BITS) & PAINTOPS_FLAG_MASK; |
| 260 | } |
| 261 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 262 | static inline unsigned PaintOp_unpackData(uint32_t op32) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 263 | return op32 & PAINTOPS_DATA_MASK; |
| 264 | } |
| 265 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 266 | static inline uint32_t PaintOp_packOp(PaintOps op) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 267 | SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 268 | |
reed@google.com | 67908f2 | 2011-06-27 14:47:50 +0000 | [diff] [blame] | 269 | return op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS); |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 270 | } |
| 271 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 272 | static inline uint32_t PaintOp_packOpData(PaintOps op, unsigned data) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 273 | SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
| 274 | SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 275 | |
reed@google.com | 67908f2 | 2011-06-27 14:47:50 +0000 | [diff] [blame] | 276 | return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | data; |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 277 | } |
| 278 | |
caryclark@google.com | 920901d | 2012-06-06 12:04:11 +0000 | [diff] [blame] | 279 | static inline uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned data) { |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 280 | SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
| 281 | SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); |
| 282 | SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 283 | |
reed@google.com | 67908f2 | 2011-06-27 14:47:50 +0000 | [diff] [blame] | 284 | return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 285 | (flags << PAINTOPS_DATA_BITS) | |
| 286 | data; |
| 287 | } |
| 288 | |
reed@google.com | bb6992a | 2011-04-26 17:41:56 +0000 | [diff] [blame] | 289 | #endif |