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

Side by Side Diff: include/gpu/GrCaps.h

Issue 1166513002: Re-enable advanced blend with a blacklist (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix msvc 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 | « no previous file | src/gpu/GrCaps.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 GrCaps_DEFINED 8 #ifndef GrCaps_DEFINED
9 #define GrCaps_DEFINED 9 #define GrCaps_DEFINED
10 10
11 #include "GrTypes.h" 11 #include "GrTypes.h"
12 #include "GrTypesPriv.h" 12 #include "GrTypesPriv.h"
13 #include "GrBlend.h"
13 #include "GrShaderVar.h" 14 #include "GrShaderVar.h"
14 #include "SkRefCnt.h" 15 #include "SkRefCnt.h"
15 #include "SkString.h" 16 #include "SkString.h"
16 17
17 struct GrContextOptions; 18 struct GrContextOptions;
18 19
19 class GrShaderCaps : public SkRefCnt { 20 class GrShaderCaps : public SkRefCnt {
20 public: 21 public:
21 SK_DECLARE_INST_COUNT(GrShaderCaps) 22 SK_DECLARE_INST_COUNT(GrShaderCaps)
22 23
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup port; } 151 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup port; }
151 152
152 bool advancedBlendEquationSupport() const { 153 bool advancedBlendEquationSupport() const {
153 return fBlendEquationSupport >= kAdvanced_BlendEquationSupport; 154 return fBlendEquationSupport >= kAdvanced_BlendEquationSupport;
154 } 155 }
155 156
156 bool advancedCoherentBlendEquationSupport() const { 157 bool advancedCoherentBlendEquationSupport() const {
157 return kAdvancedCoherent_BlendEquationSupport == fBlendEquationSupport; 158 return kAdvancedCoherent_BlendEquationSupport == fBlendEquationSupport;
158 } 159 }
159 160
161 bool canUseAdvancedBlendEquation(GrBlendEquation equation) const {
162 SkASSERT(GrBlendEquationIsAdvanced(equation));
163 return SkToBool(fAdvBlendEqBlacklist & (1 << equation));
164 }
165
160 /** 166 /**
161 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and 167 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and
162 * textures allows partial mappings or full mappings. 168 * textures allows partial mappings or full mappings.
163 */ 169 */
164 enum MapFlags { 170 enum MapFlags {
165 kNone_MapFlags = 0x0, //<! Cannot map the resource. 171 kNone_MapFlags = 0x0, //<! Cannot map the resource.
166 172
167 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of 173 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of
168 // the other flags to have meaning.k 174 // the other flags to have meaning.k
169 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. 175 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 bool fDiscardRenderTargetSupport : 1; 227 bool fDiscardRenderTargetSupport : 1;
222 bool fReuseScratchTextures : 1; 228 bool fReuseScratchTextures : 1;
223 bool fGpuTracingSupport : 1; 229 bool fGpuTracingSupport : 1;
224 bool fCompressedTexSubImageSupport : 1; 230 bool fCompressedTexSubImageSupport : 1;
225 bool fOversizedStencilSupport : 1; 231 bool fOversizedStencilSupport : 1;
226 bool fTextureBarrierSupport : 1; 232 bool fTextureBarrierSupport : 1;
227 // Driver workaround 233 // Driver workaround
228 bool fUseDrawInsteadOfClear : 1; 234 bool fUseDrawInsteadOfClear : 1;
229 235
230 BlendEquationSupport fBlendEquationSupport; 236 BlendEquationSupport fBlendEquationSupport;
237 uint32_t fAdvBlendEqBlacklist;
238 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
239
231 uint32_t fMapBufferFlags; 240 uint32_t fMapBufferFlags;
232 int fGeometryBufferMapThreshold; 241 int fGeometryBufferMapThreshold;
233 242
234 int fMaxRenderTargetSize; 243 int fMaxRenderTargetSize;
235 int fMaxTextureSize; 244 int fMaxTextureSize;
236 int fMinTextureSize; 245 int fMinTextureSize;
237 int fMaxSampleCount; 246 int fMaxSampleCount;
238 247
239 // The first entry for each config is without msaa and the second is with. 248 // The first entry for each config is without msaa and the second is with.
240 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 249 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
241 bool fConfigTextureSupport[kGrPixelConfigCnt]; 250 bool fConfigTextureSupport[kGrPixelConfigCnt];
242 251
243 private: 252 private:
244 bool fSupressPrints : 1; 253 bool fSupressPrints : 1;
245 bool fDrawPathMasksToCompressedTextureSupport : 1; 254 bool fDrawPathMasksToCompressedTextureSupport : 1;
246 255
247 typedef SkRefCnt INHERITED; 256 typedef SkRefCnt INHERITED;
248 }; 257 };
249 258
250 #endif 259 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698