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

Side by Side Diff: src/gpu/GrDrawTargetCaps.h

Issue 1037123003: Implement support for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zzz2_barriers
Patch Set: Compiler warning Created 5 years, 7 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/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrXferProcessor.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 2013 Google Inc. 3 * Copyright 2013 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 GrDrawTargetCaps_DEFINED 8 #ifndef GrDrawTargetCaps_DEFINED
9 #define GrDrawTargetCaps_DEFINED 9 #define GrDrawTargetCaps_DEFINED
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #else 135 #else
136 bool gpuTracingSupport() const { return fGpuTracingSupport; } 136 bool gpuTracingSupport() const { return fGpuTracingSupport; }
137 #endif 137 #endif
138 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup port; } 138 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup port; }
139 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } 139 bool oversizedStencilSupport() const { return fOversizedStencilSupport; }
140 bool textureBarrierSupport() const { return fTextureBarrierSupport; } 140 bool textureBarrierSupport() const { return fTextureBarrierSupport; }
141 141
142 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } 142 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; }
143 143
144 /** 144 /**
145 * Indicates the capabilities of the fixed function blend unit.
146 */
147 enum BlendEquationSupport {
148 kBasic_BlendEquationSupport, //<! Support to select the oper ator that
149 // combines src and dst terms .
150 kAdvanced_BlendEquationSupport, //<! Additional fixed function support for specific
151 // SVG/PDF blend modes. Requi res blend barriers.
152 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su pport that does not
153 // require blend barriers, an d permits overlap.
154
155 kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport
156 };
157
158 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup port; }
159
160 bool advancedBlendEquationSupport() const {
161 return fBlendEquationSupport >= kAdvanced_BlendEquationSupport;
162 }
163
164 bool advancedCoherentBlendEquationSupport() const {
165 return kAdvancedCoherent_BlendEquationSupport == fBlendEquationSupport;
166 }
167
168 /**
145 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and 169 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and
146 * textures allows partial mappings or full mappings. 170 * textures allows partial mappings or full mappings.
147 */ 171 */
148 enum MapFlags { 172 enum MapFlags {
149 kNone_MapFlags = 0x0, //<! Cannot map the resource. 173 kNone_MapFlags = 0x0, //<! Cannot map the resource.
150 174
151 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of 175 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of
152 // the other flags to have meaning.k 176 // the other flags to have meaning.k
153 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. 177 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped.
154 }; 178 };
(...skipping 30 matching lines...) Expand all
185 bool fStencilWrapOpsSupport : 1; 209 bool fStencilWrapOpsSupport : 1;
186 bool fDiscardRenderTargetSupport : 1; 210 bool fDiscardRenderTargetSupport : 1;
187 bool fReuseScratchTextures : 1; 211 bool fReuseScratchTextures : 1;
188 bool fGpuTracingSupport : 1; 212 bool fGpuTracingSupport : 1;
189 bool fCompressedTexSubImageSupport : 1; 213 bool fCompressedTexSubImageSupport : 1;
190 bool fOversizedStencilSupport : 1; 214 bool fOversizedStencilSupport : 1;
191 bool fTextureBarrierSupport : 1; 215 bool fTextureBarrierSupport : 1;
192 // Driver workaround 216 // Driver workaround
193 bool fUseDrawInsteadOfClear : 1; 217 bool fUseDrawInsteadOfClear : 1;
194 218
219 BlendEquationSupport fBlendEquationSupport;
195 uint32_t fMapBufferFlags; 220 uint32_t fMapBufferFlags;
196 221
197 int fMaxRenderTargetSize; 222 int fMaxRenderTargetSize;
198 int fMaxTextureSize; 223 int fMaxTextureSize;
199 int fMaxSampleCount; 224 int fMaxSampleCount;
200 225
201 // The first entry for each config is without msaa and the second is with. 226 // The first entry for each config is without msaa and the second is with.
202 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 227 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
203 bool fConfigTextureSupport[kGrPixelConfigCnt]; 228 bool fConfigTextureSupport[kGrPixelConfigCnt];
204 229
205 private: 230 private:
206 typedef SkRefCnt INHERITED; 231 typedef SkRefCnt INHERITED;
207 }; 232 };
208 233
209 #endif 234 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698