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

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

Issue 1158963002: Add caps overrides to GMs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments 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 | « gm/textblobuseaftergpufree.cpp ('k') | include/gpu/GrContext.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 }; 77 };
78 78
79 /** 79 /**
80 * Is there any difference between the float shader variable precision types? If this is true 80 * Is there any difference between the float shader variable precision types? If this is true
81 * then unless the shader type is not supported, any call to getFloatShaderPr ecisionInfo() would 81 * then unless the shader type is not supported, any call to getFloatShaderPr ecisionInfo() would
82 * report the same info for all precisions in all shader types. 82 * report the same info for all precisions in all shader types.
83 */ 83 */
84 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } 84 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; }
85 85
86 protected: 86 protected:
87 /** Subclasses must call this at the end of their constructors in order to a pply caps
88 overrides requested by the client. Note that overrides will only reduce the caps never
89 expand them. */
90 void applyOptionsOverrides(const GrContextOptions& options);
91
87 bool fShaderDerivativeSupport : 1; 92 bool fShaderDerivativeSupport : 1;
88 bool fGeometryShaderSupport : 1; 93 bool fGeometryShaderSupport : 1;
89 bool fPathRenderingSupport : 1; 94 bool fPathRenderingSupport : 1;
90 bool fDstReadInShaderSupport : 1; 95 bool fDstReadInShaderSupport : 1;
91 bool fDualSourceBlendingSupport : 1; 96 bool fDualSourceBlendingSupport : 1;
92 bool fMixedSamplesSupport : 1; 97 bool fMixedSamplesSupport : 1;
93 98
94 bool fShaderPrecisionVaries; 99 bool fShaderPrecisionVaries;
95 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; 100 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount];
96 101
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 SkASSERT(kGrPixelConfigCnt > config); 192 SkASSERT(kGrPixelConfigCnt > config);
188 return fConfigTextureSupport[config]; 193 return fConfigTextureSupport[config];
189 } 194 }
190 195
191 bool suppressPrints() const { return fSupressPrints; } 196 bool suppressPrints() const { return fSupressPrints; }
192 197
193 bool drawPathMasksToCompressedTexturesSupport() const { 198 bool drawPathMasksToCompressedTexturesSupport() const {
194 return fDrawPathMasksToCompressedTextureSupport; } 199 return fDrawPathMasksToCompressedTextureSupport; }
195 200
196 protected: 201 protected:
202 /** Subclasses must call this at the end of their constructors in order to a pply caps
203 overrides requested by the client. Note that overrides will only reduce the caps never
204 expand them. */
205 void applyOptionsOverrides(const GrContextOptions& options);
206
197 SkAutoTUnref<GrShaderCaps> fShaderCaps; 207 SkAutoTUnref<GrShaderCaps> fShaderCaps;
198 208
199 bool fNPOTTextureTileSupport : 1; 209 bool fNPOTTextureTileSupport : 1;
200 bool fMipMapSupport : 1; 210 bool fMipMapSupport : 1;
201 bool fTwoSidedStencilSupport : 1; 211 bool fTwoSidedStencilSupport : 1;
202 bool fStencilWrapOpsSupport : 1; 212 bool fStencilWrapOpsSupport : 1;
203 bool fDiscardRenderTargetSupport : 1; 213 bool fDiscardRenderTargetSupport : 1;
204 bool fReuseScratchTextures : 1; 214 bool fReuseScratchTextures : 1;
205 bool fGpuTracingSupport : 1; 215 bool fGpuTracingSupport : 1;
206 bool fCompressedTexSubImageSupport : 1; 216 bool fCompressedTexSubImageSupport : 1;
(...skipping 14 matching lines...) Expand all
221 bool fConfigTextureSupport[kGrPixelConfigCnt]; 231 bool fConfigTextureSupport[kGrPixelConfigCnt];
222 232
223 private: 233 private:
224 bool fSupressPrints : 1; 234 bool fSupressPrints : 1;
225 bool fDrawPathMasksToCompressedTextureSupport : 1; 235 bool fDrawPathMasksToCompressedTextureSupport : 1;
226 236
227 typedef SkRefCnt INHERITED; 237 typedef SkRefCnt INHERITED;
228 }; 238 };
229 239
230 #endif 240 #endif
OLDNEW
« no previous file with comments | « gm/textblobuseaftergpufree.cpp ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698