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 28 matching lines...) Expand all Loading... |
39 kClipRect_DrawOp, | 39 kClipRect_DrawOp, |
40 kClipRRect_DrawOp, | 40 kClipRRect_DrawOp, |
41 kConcat_DrawOp, | 41 kConcat_DrawOp, |
42 kDrawBitmap_DrawOp, | 42 kDrawBitmap_DrawOp, |
43 kDrawBitmapMatrix_DrawOp, | 43 kDrawBitmapMatrix_DrawOp, |
44 kDrawBitmapNine_DrawOp, | 44 kDrawBitmapNine_DrawOp, |
45 kDrawBitmapRectToRect_DrawOp, | 45 kDrawBitmapRectToRect_DrawOp, |
46 kDrawClear_DrawOp, | 46 kDrawClear_DrawOp, |
47 kDrawData_DrawOp, | 47 kDrawData_DrawOp, |
48 kDrawDRRect_DrawOp, | 48 kDrawDRRect_DrawOp, |
| 49 kDrawImage_DrawOp, |
| 50 kDrawImageRect_DrawOp, |
49 kDrawOval_DrawOp, | 51 kDrawOval_DrawOp, |
50 kDrawPaint_DrawOp, | 52 kDrawPaint_DrawOp, |
51 kDrawPatch_DrawOp, | 53 kDrawPatch_DrawOp, |
52 kDrawPath_DrawOp, | 54 kDrawPath_DrawOp, |
53 kDrawPicture_DrawOp, | 55 kDrawPicture_DrawOp, |
54 kDrawPoints_DrawOp, | 56 kDrawPoints_DrawOp, |
55 kDrawPosText_DrawOp, | 57 kDrawPosText_DrawOp, |
56 kDrawPosTextH_DrawOp, | 58 kDrawPosTextH_DrawOp, |
57 kDrawRect_DrawOp, | 59 kDrawRect_DrawOp, |
58 kDrawRRect_DrawOp, | 60 kDrawRRect_DrawOp, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 enum { | 152 enum { |
151 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, | 153 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, |
152 // Specific to drawBitmapRect, but needs to be different from HasPaint, | 154 // Specific to drawBitmapRect, but needs to be different from HasPaint, |
153 // which is used for all drawBitmap calls, so include it here. | 155 // which is used for all drawBitmap calls, so include it here. |
154 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, | 156 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, |
155 // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is | 157 // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is |
156 // converted into and out of this flag to save space | 158 // converted into and out of this flag to save space |
157 kDrawBitmap_Bleed_DrawOpFlag = 1 << 2, | 159 kDrawBitmap_Bleed_DrawOpFlag = 1 << 2, |
158 }; | 160 }; |
159 enum { | 161 enum { |
| 162 kDrawImage_HasPaint_DrawOpFlag = 1 << 0, |
| 163 kDrawImage_HasSrcRect_DrawOpFlag = 1 << 1, |
| 164 }; |
| 165 enum { |
160 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, | 166 kClip_HasAntiAlias_DrawOpFlag = 1 << 0, |
161 }; | 167 }; |
162 /////////////////////////////////////////////////////////////////////////////// | 168 /////////////////////////////////////////////////////////////////////////////// |
163 | 169 |
164 class BitmapInfo : SkNoncopyable { | 170 class BitmapInfo : SkNoncopyable { |
165 public: | 171 public: |
166 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) | 172 BitmapInfo(SkBitmap* bitmap, uint32_t genID, int toBeDrawnCount) |
167 : fBitmap(bitmap) | 173 : fBitmap(bitmap) |
168 , fGenID(genID) | 174 , fGenID(genID) |
169 , fBytesAllocated(0) | 175 , fBytesAllocated(0) |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); | 287 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); |
282 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); | 288 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); |
283 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); | 289 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); |
284 | 290 |
285 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | | 291 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | |
286 (flags << PAINTOPS_DATA_BITS) | | 292 (flags << PAINTOPS_DATA_BITS) | |
287 data; | 293 data; |
288 } | 294 } |
289 | 295 |
290 #endif | 296 #endif |
OLD | NEW |