aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-01-07 17:06:04 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-07 17:06:04 -0800
commit4999df8ca2d53d7f34e0f6d0c70ab620bef2fe13 (patch)
tree1761d982a48c93f9de8b0c57259599abda89ea6b /include
parent3061af4a5f2b8ef00fc4a34b04cf99dfb780f1a1 (diff)
Revert of Move config texturability/renderability to config table (patchset #8 id:140001 of https://codereview.chromium.org/1563443002/ )
Reason for revert: speculative revert for breaking iOS writePixels tests Original issue's description: > Move config texturability/renderability to config table. > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002 > > Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949 TBR=jvanverth@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1569103003
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrCaps.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 217a446264..3a6d27ba66 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -194,8 +194,15 @@ public:
// Will be 0 if MSAA is not supported
int maxSampleCount() const { return fMaxSampleCount; }
- virtual bool isConfigTexturable(GrPixelConfig config) const = 0;
- virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const = 0;
+ bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const {
+ SkASSERT(kGrPixelConfigCnt > config);
+ return fConfigRenderSupport[config][withMSAA];
+ }
+
+ bool isConfigTexturable(GrPixelConfig config) const {
+ SkASSERT(kGrPixelConfigCnt > config);
+ return fConfigTextureSupport[config];
+ }
bool suppressPrints() const { return fSuppressPrints; }
@@ -263,6 +270,10 @@ protected:
int fMaxTileSize;
int fMaxSampleCount;
+ // The first entry for each config is without msaa and the second is with.
+ bool fConfigRenderSupport[kGrPixelConfigCnt][2];
+ bool fConfigTextureSupport[kGrPixelConfigCnt];
+
private:
virtual void onApplyOptionsOverrides(const GrContextOptions&) {};