Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 enum { | 141 enum { |
| 142 kDrawVertices_HasTexs_DrawOpFlag = 1 << 0, | 142 kDrawVertices_HasTexs_DrawOpFlag = 1 << 0, |
| 143 kDrawVertices_HasColors_DrawOpFlag = 1 << 1, | 143 kDrawVertices_HasColors_DrawOpFlag = 1 << 1, |
| 144 kDrawVertices_HasIndices_DrawOpFlag = 1 << 2, | 144 kDrawVertices_HasIndices_DrawOpFlag = 1 << 2, |
| 145 }; | 145 }; |
| 146 enum { | 146 enum { |
| 147 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, | 147 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, |
| 148 // Specific to drawBitmapRect, but needs to be different from HasPaint, | 148 // Specific to drawBitmapRect, but needs to be different from HasPaint, |
| 149 // which is used for all drawBitmap calls, so include it here. | 149 // which is used for all drawBitmap calls, so include it here. |
| 150 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, | 150 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, |
| 151 // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is | |
| 152 // converted into and out of this flag to save space | |
| 153 kDrawBitmap_Bleed_DrawOpFlag = 1 << 2, | |
|
scroggo
2013/08/13 21:05:46
nit: = should line up with = for other flags.
robertphillips
2013/08/14 15:37:41
Done.
| |
| 151 }; | 154 }; |
| 152 enum { | 155 enum { |
| 153 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, | 156 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, |
| 154 }; | 157 }; |
| 155 /////////////////////////////////////////////////////////////////////////////// | 158 /////////////////////////////////////////////////////////////////////////////// |
| 156 | 159 |
| 157 class BitmapInfo : SkNoncopyable { | 160 class BitmapInfo : SkNoncopyable { |
| 158 public: | 161 public: |
| 159 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) | 162 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) |
| 160 : fBitmap(bitmap) | 163 : fBitmap(bitmap) |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); | 276 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
| 274 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); | 277 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); |
| 275 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); | 278 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
| 276 | 279 |
| 277 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | | 280 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | |
| 278 (flags << PAINTOPS_DATA_BITS) | | 281 (flags << PAINTOPS_DATA_BITS) | |
| 279 data; | 282 data; |
| 280 } | 283 } |
| 281 | 284 |
| 282 #endif | 285 #endif |
| OLD | NEW |