aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrCaps.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-01-07 13:00:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-07 13:00:11 -0800
commit32a3cd2f2860b15a842a6aa49e4e6a3bed04f949 (patch)
tree55c4e3af9a4b436b6a8da35a30e0f9d2660d7fd0 /src/gpu/GrCaps.cpp
parentb30dd1db1d914b85a691b4724713ba1b0f16cd6c (diff)
Move config texturability/renderability to config table.
Diffstat (limited to 'src/gpu/GrCaps.cpp')
-rw-r--r--src/gpu/GrCaps.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index 7003cc5bfe..101d5f445b 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;