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

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

Issue 1139753002: Refactor GrBufferAllocPools to use resource cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix merge issue 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 | include/gpu/GrTextureProvider.h » ('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
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. 178 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped.
179 }; 179 };
180 180
181 uint32_t mapBufferFlags() const { return fMapBufferFlags; } 181 uint32_t mapBufferFlags() const { return fMapBufferFlags; }
182 182
183 // Scratch textures not being reused means that those scratch textures 183 // Scratch textures not being reused means that those scratch textures
184 // that we upload to (i.e., don't have a render target) will not be 184 // that we upload to (i.e., don't have a render target) will not be
185 // recycled in the texture cache. This is to prevent ghosting by drivers 185 // recycled in the texture cache. This is to prevent ghosting by drivers
186 // (in particular for deferred architectures). 186 // (in particular for deferred architectures).
187 bool reuseScratchTextures() const { return fReuseScratchTextures; } 187 bool reuseScratchTextures() const { return fReuseScratchTextures; }
188 bool reuseScratchBuffers() const { return fReuseScratchBuffers; }
188 189
189 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } 190 int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
190 int maxTextureSize() const { return fMaxTextureSize; } 191 int maxTextureSize() const { return fMaxTextureSize; }
191 /** 0 unless GPU has problems with small textures */ 192 /** 0 unless GPU has problems with small textures */
192 int minTextureSize() const { return fMinTextureSize; } 193 int minTextureSize() const { return fMinTextureSize; }
193 194
194 // Will be 0 if MSAA is not supported 195 // Will be 0 if MSAA is not supported
195 int maxSampleCount() const { return fMaxSampleCount; } 196 int maxSampleCount() const { return fMaxSampleCount; }
196 197
197 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { 198 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const {
(...skipping 24 matching lines...) Expand all
222 void applyOptionsOverrides(const GrContextOptions& options); 223 void applyOptionsOverrides(const GrContextOptions& options);
223 224
224 SkAutoTUnref<GrShaderCaps> fShaderCaps; 225 SkAutoTUnref<GrShaderCaps> fShaderCaps;
225 226
226 bool fNPOTTextureTileSupport : 1; 227 bool fNPOTTextureTileSupport : 1;
227 bool fMipMapSupport : 1; 228 bool fMipMapSupport : 1;
228 bool fTwoSidedStencilSupport : 1; 229 bool fTwoSidedStencilSupport : 1;
229 bool fStencilWrapOpsSupport : 1; 230 bool fStencilWrapOpsSupport : 1;
230 bool fDiscardRenderTargetSupport : 1; 231 bool fDiscardRenderTargetSupport : 1;
231 bool fReuseScratchTextures : 1; 232 bool fReuseScratchTextures : 1;
233 bool fReuseScratchBuffers : 1;
232 bool fGpuTracingSupport : 1; 234 bool fGpuTracingSupport : 1;
233 bool fCompressedTexSubImageSupport : 1; 235 bool fCompressedTexSubImageSupport : 1;
234 bool fOversizedStencilSupport : 1; 236 bool fOversizedStencilSupport : 1;
235 bool fTextureBarrierSupport : 1; 237 bool fTextureBarrierSupport : 1;
238
236 // Driver workaround 239 // Driver workaround
237 bool fUseDrawInsteadOfClear : 1; 240 bool fUseDrawInsteadOfClear : 1;
238 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; 241 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1;
239 242
240 BlendEquationSupport fBlendEquationSupport; 243 BlendEquationSupport fBlendEquationSupport;
241 uint32_t fAdvBlendEqBlacklist; 244 uint32_t fAdvBlendEqBlacklist;
242 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); 245 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
243 246
244 uint32_t fMapBufferFlags; 247 uint32_t fMapBufferFlags;
245 int fGeometryBufferMapThreshold; 248 int fGeometryBufferMapThreshold;
246 249
247 int fMaxRenderTargetSize; 250 int fMaxRenderTargetSize;
248 int fMaxTextureSize; 251 int fMaxTextureSize;
249 int fMinTextureSize; 252 int fMinTextureSize;
250 int fMaxSampleCount; 253 int fMaxSampleCount;
251 254
252 // The first entry for each config is without msaa and the second is with. 255 // The first entry for each config is without msaa and the second is with.
253 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 256 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
254 bool fConfigTextureSupport[kGrPixelConfigCnt]; 257 bool fConfigTextureSupport[kGrPixelConfigCnt];
255 258
256 private: 259 private:
257 bool fSupressPrints : 1; 260 bool fSupressPrints : 1;
258 bool fDrawPathMasksToCompressedTextureSupport : 1; 261 bool fDrawPathMasksToCompressedTextureSupport : 1;
259 262
260 typedef SkRefCnt INHERITED; 263 typedef SkRefCnt INHERITED;
261 }; 264 };
262 265
263 #endif 266 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTextureProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698