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

Unified Diff: src/gpu/GrDrawTargetCaps.h

Issue 26342006: Move renderable config list to GrDrawTargetCaps (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix size_t/int comparison Created 7 years, 2 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 | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTargetCaps.h
diff --git a/src/gpu/GrDrawTargetCaps.h b/src/gpu/GrDrawTargetCaps.h
index 111b35bf74e3af72be8999fa6b6b97790dc5aadb..11347e3cb64c4a2396b9e94054d365281ea846b9 100644
--- a/src/gpu/GrDrawTargetCaps.h
+++ b/src/gpu/GrDrawTargetCaps.h
@@ -7,6 +7,7 @@
*/
#include "SkRefCnt.h"
+#include "GrTypes.h"
#ifndef GrDrawTargetCaps_DEFINED
#define GrDrawTargetCaps_DEFINED
@@ -43,6 +44,14 @@ public:
// Will be 0 if MSAA is not supported
int maxSampleCount() const { return fMaxSampleCount; }
+ /**
+ * Can the provided configuration act as a render target?
+ */
+ bool isConfigRenderable(GrPixelConfig config) const {
+ SkASSERT(kGrPixelConfigCnt > config);
+ return fConfigRenderSupport[config];
+ }
+
protected:
bool f8BitPaletteSupport : 1;
bool fNPOTTextureTileSupport : 1;
@@ -61,6 +70,8 @@ protected:
int fMaxTextureSize;
int fMaxSampleCount;
+ bool fConfigRenderSupport[kGrPixelConfigCnt];
+
typedef SkRefCnt INHERITED;
};
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698