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

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

Issue 1563443002: Move config texturability/renderability to config table (Closed) Base URL: https://skia.googlesource.com/skia.git@readpixformat
Patch Set: whitespace cleanup 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 | « 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
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } 188 int maxRenderTargetSize() const { return fMaxRenderTargetSize; }
189 int maxTextureSize() const { return fMaxTextureSize; } 189 int maxTextureSize() const { return fMaxTextureSize; }
190 /** This is the maximum tile size to use by GPU devices for rendering sw-bac ked images/bitmaps. 190 /** This is the maximum tile size to use by GPU devices for rendering sw-bac ked images/bitmaps.
191 It is usually the max texture size, unless we're overriding it for testi ng. */ 191 It is usually the max texture size, unless we're overriding it for testi ng. */
192 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return fMaxTileSize; } 192 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return fMaxTileSize; }
193 193
194 // Will be 0 if MSAA is not supported 194 // Will be 0 if MSAA is not supported
195 int maxSampleCount() const { return fMaxSampleCount; } 195 int maxSampleCount() const { return fMaxSampleCount; }
196 196
197 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { 197 virtual bool isConfigTexturable(GrPixelConfig config) const = 0;
198 SkASSERT(kGrPixelConfigCnt > config); 198 virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const = 0;
199 return fConfigRenderSupport[config][withMSAA];
200 }
201
202 bool isConfigTexturable(GrPixelConfig config) const {
203 SkASSERT(kGrPixelConfigCnt > config);
204 return fConfigTextureSupport[config];
205 }
206 199
207 bool suppressPrints() const { return fSuppressPrints; } 200 bool suppressPrints() const { return fSuppressPrints; }
208 201
209 bool immediateFlush() const { return fImmediateFlush; } 202 bool immediateFlush() const { return fImmediateFlush; }
210 203
211 bool drawPathMasksToCompressedTexturesSupport() const { 204 bool drawPathMasksToCompressedTexturesSupport() const {
212 return fDrawPathMasksToCompressedTextureSupport; 205 return fDrawPathMasksToCompressedTextureSupport;
213 } 206 }
214 207
215 size_t geometryBufferMapThreshold() const { 208 size_t geometryBufferMapThreshold() const {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); 256 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32);
264 257
265 uint32_t fMapBufferFlags; 258 uint32_t fMapBufferFlags;
266 int fGeometryBufferMapThreshold; 259 int fGeometryBufferMapThreshold;
267 260
268 int fMaxRenderTargetSize; 261 int fMaxRenderTargetSize;
269 int fMaxTextureSize; 262 int fMaxTextureSize;
270 int fMaxTileSize; 263 int fMaxTileSize;
271 int fMaxSampleCount; 264 int fMaxSampleCount;
272 265
273 // The first entry for each config is without msaa and the second is with.
274 bool fConfigRenderSupport[kGrPixelConfigCnt][2];
275 bool fConfigTextureSupport[kGrPixelConfigCnt];
276
277 private: 266 private:
278 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; 267 virtual void onApplyOptionsOverrides(const GrContextOptions&) {};
279 268
280 bool fSuppressPrints : 1; 269 bool fSuppressPrints : 1;
281 bool fImmediateFlush: 1; 270 bool fImmediateFlush: 1;
282 bool fDrawPathMasksToCompressedTextureSupport : 1; 271 bool fDrawPathMasksToCompressedTextureSupport : 1;
283 272
284 typedef SkRefCnt INHERITED; 273 typedef SkRefCnt INHERITED;
285 }; 274 };
286 275
287 #endif 276 #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