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

Unified Diff: src/gpu/GrCaps.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrCaps.cpp
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index 7003cc5bfec0971c131d50e1568142794603b2b2..101d5f445b4094f686777ef9b7f64a2d5f2b2078 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -106,9 +106,6 @@ GrCaps::GrCaps(const GrContextOptions& options) {
fMaxTextureSize = 1;
fMaxSampleCount = 0;
- memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
- memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
-
fSuppressPrints = options.fSuppressPrints;
fImmediateFlush = options.fImmediateMode;
fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedTexture;
@@ -229,22 +226,24 @@ SkString GrCaps::dump() const {
GR_STATIC_ASSERT(14 == kRGBA_half_GrPixelConfig);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt);
- SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]);
- SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]);
+ SkASSERT(!this->isConfigRenderable(kUnknown_GrPixelConfig, false));
+ SkASSERT(!this->isConfigRenderable(kUnknown_GrPixelConfig, true));
for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
+ GrPixelConfig config = static_cast<GrPixelConfig>(i);
r.appendf("%s is renderable: %s, with MSAA: %s\n",
kConfigNames[i],
- gNY[fConfigRenderSupport[i][0]],
- gNY[fConfigRenderSupport[i][1]]);
+ gNY[this->isConfigRenderable(config, false)],
+ gNY[this->isConfigRenderable(config, true)]);
}
- SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
+ SkASSERT(!this->isConfigTexturable(kUnknown_GrPixelConfig));
for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
+ GrPixelConfig config = static_cast<GrPixelConfig>(i);
r.appendf("%s is uploadable to a texture: %s\n",
kConfigNames[i],
- gNY[fConfigTextureSupport[i]]);
+ gNY[this->isConfigTexturable(config)]);
}
return r;
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698