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