Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: src/pipe/SkGPipePriv.h

Issue 1181913003: add SkCanvas::drawAtlas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warnings Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkRecords.h ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 32
33 enum DrawOps { 33 enum DrawOps {
34 kSkip_DrawOp, // skip an addition N bytes (N == data) 34 kSkip_DrawOp, // skip an addition N bytes (N == data)
35 35
36 // these match Canvas apis 36 // these match Canvas apis
37 kClipPath_DrawOp, 37 kClipPath_DrawOp,
38 kClipRegion_DrawOp, 38 kClipRegion_DrawOp,
39 kClipRect_DrawOp, 39 kClipRect_DrawOp,
40 kClipRRect_DrawOp, 40 kClipRRect_DrawOp,
41 kConcat_DrawOp, 41 kConcat_DrawOp,
42 kDrawAtlas_DrawOp,
42 kDrawBitmap_DrawOp, 43 kDrawBitmap_DrawOp,
43 kDrawBitmapNine_DrawOp, 44 kDrawBitmapNine_DrawOp,
44 kDrawBitmapRectToRect_DrawOp, 45 kDrawBitmapRectToRect_DrawOp,
45 kDrawDRRect_DrawOp, 46 kDrawDRRect_DrawOp,
46 kDrawImage_DrawOp, 47 kDrawImage_DrawOp,
47 kDrawImageRect_DrawOp, 48 kDrawImageRect_DrawOp,
48 kDrawOval_DrawOp, 49 kDrawOval_DrawOp,
49 kDrawPaint_DrawOp, 50 kDrawPaint_DrawOp,
50 kDrawPatch_DrawOp, 51 kDrawPatch_DrawOp,
51 kDrawPath_DrawOp, 52 kDrawPath_DrawOp,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 138 };
138 enum { 139 enum {
139 kDrawTextOnPath_HasMatrix_DrawOpFlag = 1 << 0 140 kDrawTextOnPath_HasMatrix_DrawOpFlag = 1 << 0
140 }; 141 };
141 enum { 142 enum {
142 kDrawVertices_HasTexs_DrawOpFlag = 1 << 0, 143 kDrawVertices_HasTexs_DrawOpFlag = 1 << 0,
143 kDrawVertices_HasColors_DrawOpFlag = 1 << 1, 144 kDrawVertices_HasColors_DrawOpFlag = 1 << 1,
144 kDrawVertices_HasIndices_DrawOpFlag = 1 << 2, 145 kDrawVertices_HasIndices_DrawOpFlag = 1 << 2,
145 kDrawVertices_HasXfermode_DrawOpFlag = 1 << 3, 146 kDrawVertices_HasXfermode_DrawOpFlag = 1 << 3,
146 }; 147 };
148 enum {
149 kDrawAtlas_HasPaint_DrawOpFlag = 1 << 0,
150 kDrawAtlas_HasColors_DrawOpFlag = 1 << 1,
151 kDrawAtlas_HasCull_DrawOpFlag = 1 << 2,
152 };
147 // These are shared between drawbitmap and drawimage 153 // These are shared between drawbitmap and drawimage
148 enum { 154 enum {
149 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0, 155 kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0,
150 // Specific to drawBitmapRect, but needs to be different from HasPaint, 156 // Specific to drawBitmapRect, but needs to be different from HasPaint,
151 // which is used for all drawBitmap calls, so include it here. 157 // which is used for all drawBitmap calls, so include it here.
152 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1, 158 kDrawBitmap_HasSrcRect_DrawOpFlag = 1 << 1,
153 // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is 159 // SkCanvas::DrawBitmapRectFlags::kBleed_DrawBitmapRectFlag is
154 // converted into and out of this flag to save space 160 // converted into and out of this flag to save space
155 kDrawBitmap_Bleed_DrawOpFlag = 1 << 2, 161 kDrawBitmap_Bleed_DrawOpFlag = 1 << 2,
156 }; 162 };
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK)); 304 SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
299 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK)); 305 SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK));
300 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK)); 306 SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK));
301 307
302 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | 308 return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) |
303 (flags << PAINTOPS_DATA_BITS) | 309 (flags << PAINTOPS_DATA_BITS) |
304 data; 310 data;
305 } 311 }
306 312
307 #endif 313 #endif
OLDNEW
« no previous file with comments | « src/core/SkRecords.h ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698