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

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

Issue 1275543005: Move some work from backend onClear to base class clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pass references and rebase Created 5 years, 4 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/GrBufferedDrawTarget.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 size_t geometryBufferMapThreshold() const { 210 size_t geometryBufferMapThreshold() const {
211 SkASSERT(fGeometryBufferMapThreshold >= 0); 211 SkASSERT(fGeometryBufferMapThreshold >= 0);
212 return fGeometryBufferMapThreshold; 212 return fGeometryBufferMapThreshold;
213 } 213 }
214 214
215 bool supportsInstancedDraws() const { 215 bool supportsInstancedDraws() const {
216 return fSupportsInstancedDraws; 216 return fSupportsInstancedDraws;
217 } 217 }
218 218
219 bool fullClearIsFree() const { return fFullClearIsFree; }
220
219 protected: 221 protected:
220 /** Subclasses must call this at the end of their constructors in order to a pply caps 222 /** Subclasses must call this at the end of their constructors in order to a pply caps
221 overrides requested by the client. Note that overrides will only reduce the caps never 223 overrides requested by the client. Note that overrides will only reduce the caps never
222 expand them. */ 224 expand them. */
223 void applyOptionsOverrides(const GrContextOptions& options); 225 void applyOptionsOverrides(const GrContextOptions& options);
224 226
225 SkAutoTUnref<GrShaderCaps> fShaderCaps; 227 SkAutoTUnref<GrShaderCaps> fShaderCaps;
226 228
227 bool fNPOTTextureTileSupport : 1; 229 bool fNPOTTextureTileSupport : 1;
228 bool fMipMapSupport : 1; 230 bool fMipMapSupport : 1;
229 bool fTwoSidedStencilSupport : 1; 231 bool fTwoSidedStencilSupport : 1;
230 bool fStencilWrapOpsSupport : 1; 232 bool fStencilWrapOpsSupport : 1;
231 bool fDiscardRenderTargetSupport : 1; 233 bool fDiscardRenderTargetSupport : 1;
232 bool fReuseScratchTextures : 1; 234 bool fReuseScratchTextures : 1;
233 bool fReuseScratchBuffers : 1; 235 bool fReuseScratchBuffers : 1;
234 bool fGpuTracingSupport : 1; 236 bool fGpuTracingSupport : 1;
235 bool fCompressedTexSubImageSupport : 1; 237 bool fCompressedTexSubImageSupport : 1;
236 bool fOversizedStencilSupport : 1; 238 bool fOversizedStencilSupport : 1;
237 bool fTextureBarrierSupport : 1; 239 bool fTextureBarrierSupport : 1;
238 bool fSupportsInstancedDraws : 1; 240 bool fSupportsInstancedDraws : 1;
241 bool fFullClearIsFree : 1;
239 242
240 // Driver workaround 243 // Driver workaround
241 bool fUseDrawInsteadOfClear : 1; 244 bool fUseDrawInsteadOfClear : 1;
242 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; 245 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1;
243 246
244 BlendEquationSupport fBlendEquationSupport; 247 BlendEquationSupport fBlendEquationSupport;
245 uint32_t fAdvBlendEqBlacklist; 248 uint32_t fAdvBlendEqBlacklist;
246 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); 249 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
247 250
248 uint32_t fMapBufferFlags; 251 uint32_t fMapBufferFlags;
249 int fGeometryBufferMapThreshold; 252 int fGeometryBufferMapThreshold;
250 253
251 int fMaxRenderTargetSize; 254 int fMaxRenderTargetSize;
252 int fMaxTextureSize; 255 int fMaxTextureSize;
253 int fMinTextureSize; 256 int fMinTextureSize;
254 int fMaxSampleCount; 257 int fMaxSampleCount;
255 258
256 // The first entry for each config is without msaa and the second is with. 259 // The first entry for each config is without msaa and the second is with.
257 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; 260 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
258 bool fConfigTextureSupport[kGrPixelConfigCnt]; 261 bool fConfigTextureSupport[kGrPixelConfigCnt];
259 262
260 private: 263 private:
261 bool fSupressPrints : 1; 264 bool fSupressPrints : 1;
262 bool fDrawPathMasksToCompressedTextureSupport : 1; 265 bool fDrawPathMasksToCompressedTextureSupport : 1;
263 266
264 typedef SkRefCnt INHERITED; 267 typedef SkRefCnt INHERITED;
265 }; 268 };
266 269
267 #endif 270 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBufferedDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698