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

Side by Side Diff: src/core/SkPictureFlat.h

Issue 1565203002: Revert of add backdrop option to SaveLayerRec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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/SkCanvas.cpp ('k') | src/core/SkPicturePlayback.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 #ifndef SkPictureFlat_DEFINED 8 #ifndef SkPictureFlat_DEFINED
9 #define SkPictureFlat_DEFINED 9 #define SkPictureFlat_DEFINED
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 DRAW_PATCH, // could not add in aphabetical order 69 DRAW_PATCH, // could not add in aphabetical order
70 DRAW_PICTURE_MATRIX_PAINT, 70 DRAW_PICTURE_MATRIX_PAINT,
71 DRAW_TEXT_BLOB, 71 DRAW_TEXT_BLOB,
72 DRAW_IMAGE, 72 DRAW_IMAGE,
73 DRAW_IMAGE_RECT_STRICT, // deprecated (M45) 73 DRAW_IMAGE_RECT_STRICT, // deprecated (M45)
74 DRAW_ATLAS, 74 DRAW_ATLAS,
75 DRAW_IMAGE_NINE, 75 DRAW_IMAGE_NINE,
76 DRAW_IMAGE_RECT, 76 DRAW_IMAGE_RECT,
77 77
78 SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016, 78 SAVE_LAYER_SAVELAYERFLAGS,
79 SAVE_LAYER_SAVELAYERREC,
80 79
81 LAST_DRAWTYPE_ENUM = SAVE_LAYER_SAVELAYERREC, 80 LAST_DRAWTYPE_ENUM = SAVE_LAYER_SAVELAYERFLAGS,
82 }; 81 };
83 82
84 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP* 83 // In the 'match' method, this constant will match any flavor of DRAW_BITMAP*
85 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; 84 static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1;
86 85
87 enum DrawVertexFlags { 86 enum DrawVertexFlags {
88 DRAW_VERTICES_HAS_TEXS = 0x01, 87 DRAW_VERTICES_HAS_TEXS = 0x01,
89 DRAW_VERTICES_HAS_COLORS = 0x02, 88 DRAW_VERTICES_HAS_COLORS = 0x02,
90 DRAW_VERTICES_HAS_INDICES = 0x04, 89 DRAW_VERTICES_HAS_INDICES = 0x04,
91 DRAW_VERTICES_HAS_XFER = 0x08, 90 DRAW_VERTICES_HAS_XFER = 0x08,
92 }; 91 };
93 92
94 enum DrawAtlasFlags { 93 enum DrawAtlasFlags {
95 DRAW_ATLAS_HAS_COLORS = 1 << 0, 94 DRAW_ATLAS_HAS_COLORS = 1 << 0,
96 DRAW_ATLAS_HAS_CULL = 1 << 1, 95 DRAW_ATLAS_HAS_CULL = 1 << 1,
97 }; 96 };
98 97
99 enum SaveLayerRecFlatFlags {
100 SAVELAYERREC_HAS_BOUNDS = 1 << 0,
101 SAVELAYERREC_HAS_PAINT = 1 << 1,
102 SAVELAYERREC_HAS_BACKDROP = 1 << 2,
103 SAVELAYERREC_HAS_FLAGS = 1 << 3,
104 };
105
106 /////////////////////////////////////////////////////////////////////////////// 98 ///////////////////////////////////////////////////////////////////////////////
107 // clipparams are packed in 5 bits 99 // clipparams are packed in 5 bits
108 // doAA:1 | regionOp:4 100 // doAA:1 | regionOp:4
109 101
110 static inline uint32_t ClipParams_pack(SkRegion::Op op, bool doAA) { 102 static inline uint32_t ClipParams_pack(SkRegion::Op op, bool doAA) {
111 unsigned doAABit = doAA ? 1 : 0; 103 unsigned doAABit = doAA ? 1 : 0;
112 return (doAABit << 4) | op; 104 return (doAABit << 4) | op;
113 } 105 }
114 106
115 static inline SkRegion::Op ClipParams_unpackRegionOp(uint32_t packed) { 107 static inline SkRegion::Op ClipParams_unpackRegionOp(uint32_t packed) {
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 bool fReady; 555 bool fReady;
564 556
565 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas ed. Careful! 557 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas ed. Careful!
566 SkTDArray<const SkFlatData*> fIndexedData; 558 SkTDArray<const SkFlatData*> fIndexedData;
567 559
568 // For SkFlatData -> cached SkFlatData, which has index(). 560 // For SkFlatData -> cached SkFlatData, which has index().
569 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; 561 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash;
570 }; 562 };
571 563
572 #endif 564 #endif
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698