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

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

Issue 1626553002: Revert of added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « gyp/gpu.gypi ('k') | include/gpu/GrConfig.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return fFloatPrecisions[shaderType][precision]; 74 return fFloatPrecisions[shaderType][precision];
75 }; 75 };
76 76
77 /** 77 /**
78 * Is there any difference between the float shader variable precision types? If this is true 78 * Is there any difference between the float shader variable precision types? If this is true
79 * then unless the shader type is not supported, any call to getFloatShaderPr ecisionInfo() would 79 * then unless the shader type is not supported, any call to getFloatShaderPr ecisionInfo() would
80 * report the same info for all precisions in all shader types. 80 * report the same info for all precisions in all shader types.
81 */ 81 */
82 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } 82 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; }
83 83
84 /**
85 * PLS storage size in bytes (0 when not supported). The PLS spec defines a minimum size of 16
86 * bytes whenever PLS is supported.
87 */
88 int pixelLocalStorageSize() const { return fPixelLocalStorageSize; }
89
90 /**
91 * True if this context supports the necessary extensions and features to en able the PLS path
92 * renderer.
93 */
94 bool plsPathRenderingSupport() const {
95 #if GR_ENABLE_PLS_PATH_RENDERING
96 return fPLSPathRenderingSupport;
97 #else
98 return false;
99 #endif
100 }
101
102 protected: 84 protected:
103 /** Subclasses must call this after initialization in order to apply caps ov errides requested by 85 /** Subclasses must call this after initialization in order to apply caps ov errides requested by
104 the client. Note that overrides will only reduce the caps never expand t hem. */ 86 the client. Note that overrides will only reduce the caps never expand t hem. */
105 void applyOptionsOverrides(const GrContextOptions& options); 87 void applyOptionsOverrides(const GrContextOptions& options);
106 88
107 bool fShaderDerivativeSupport : 1; 89 bool fShaderDerivativeSupport : 1;
108 bool fGeometryShaderSupport : 1; 90 bool fGeometryShaderSupport : 1;
109 bool fPathRenderingSupport : 1; 91 bool fPathRenderingSupport : 1;
110 bool fDstReadInShaderSupport : 1; 92 bool fDstReadInShaderSupport : 1;
111 bool fDualSourceBlendingSupport : 1; 93 bool fDualSourceBlendingSupport : 1;
112 94
113 bool fShaderPrecisionVaries; 95 bool fShaderPrecisionVaries;
114 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; 96 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount];
115 int fPixelLocalStorageSize;
116 bool fPLSPathRenderingSupport;
117 97
118 private: 98 private:
119 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; 99 virtual void onApplyOptionsOverrides(const GrContextOptions&) {};
120 typedef SkRefCnt INHERITED; 100 typedef SkRefCnt INHERITED;
121 }; 101 };
122 102
123 /** 103 /**
124 * Represents the capabilities of a GrContext. 104 * Represents the capabilities of a GrContext.
125 */ 105 */
126 class GrCaps : public SkRefCnt { 106 class GrCaps : public SkRefCnt {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; 276 virtual void onApplyOptionsOverrides(const GrContextOptions&) {};
297 277
298 bool fSuppressPrints : 1; 278 bool fSuppressPrints : 1;
299 bool fImmediateFlush: 1; 279 bool fImmediateFlush: 1;
300 bool fDrawPathMasksToCompressedTextureSupport : 1; 280 bool fDrawPathMasksToCompressedTextureSupport : 1;
301 281
302 typedef SkRefCnt INHERITED; 282 typedef SkRefCnt INHERITED;
303 }; 283 };
304 284
305 #endif 285 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698