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

Unified Diff: src/gpu/GrCaps.cpp

Issue 1569103003: Revert of Move config texturability/renderability to config table (Closed) Base URL: https://skia.googlesource.com/skia.git@readpixformat
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 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 101d5f445b4094f686777ef9b7f64a2d5f2b2078..7003cc5bfec0971c131d50e1568142794603b2b2 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -105,6 +105,9 @@
fMaxRenderTargetSize = 1;
fMaxTextureSize = 1;
fMaxSampleCount = 0;
+
+ memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
+ memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
fSuppressPrints = options.fSuppressPrints;
fImmediateFlush = options.fImmediateMode;
@@ -226,24 +229,22 @@
GR_STATIC_ASSERT(14 == kRGBA_half_GrPixelConfig);
GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt);
- SkASSERT(!this->isConfigRenderable(kUnknown_GrPixelConfig, false));
- SkASSERT(!this->isConfigRenderable(kUnknown_GrPixelConfig, true));
+ SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]);
+ SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]);
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[this->isConfigRenderable(config, false)],
- gNY[this->isConfigRenderable(config, true)]);
- }
-
- SkASSERT(!this->isConfigTexturable(kUnknown_GrPixelConfig));
+ gNY[fConfigRenderSupport[i][0]],
+ gNY[fConfigRenderSupport[i][1]]);
+ }
+
+ SkASSERT(!fConfigTextureSupport[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[this->isConfigTexturable(config)]);
+ gNY[fConfigTextureSupport[i]]);
}
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