summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/gpu/gl/GrGLCaps.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/gpu/gl/GrGLCaps.h')
-rw-r--r--chromium/third_party/skia/src/gpu/gl/GrGLCaps.h69
1 files changed, 50 insertions, 19 deletions
diff --git a/chromium/third_party/skia/src/gpu/gl/GrGLCaps.h b/chromium/third_party/skia/src/gpu/gl/GrGLCaps.h
index 7f0c8874ca2..7f722f912d9 100644
--- a/chromium/third_party/skia/src/gpu/gl/GrGLCaps.h
+++ b/chromium/third_party/skia/src/gpu/gl/GrGLCaps.h
@@ -75,7 +75,24 @@ public:
/** GL_NV_shader_framebuffer_fetch */
kNV_FBFetchType,
- kLast_FBFetchType = kNV_FBFetchType,
+ kLast_FBFetchType = kNV_FBFetchType
+ };
+
+ enum InvalidateFBType {
+ kNone_InvalidateFBType,
+ kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
+ kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
+
+ kLast_InvalidateFBType = kInvalidate_InvalidateFBType
+ };
+
+ enum MapBufferType {
+ kNone_MapBufferType,
+ kMapBuffer_MapBufferType, // glMapBuffer()
+ kMapBufferRange_MapBufferType, // glMapBufferRange()
+ kChromium_MapBufferType, // GL_CHROMIUM_map_sub
+
+ kLast_MapBufferType = kChromium_MapBufferType,
};
/**
@@ -97,7 +114,7 @@ public:
* Initializes the GrGLCaps to the set of features supported in the current
* OpenGL context accessible via ctxInfo.
*/
- void init(const GrGLContextInfo& ctxInfo, const GrGLInterface* interface);
+ bool init(const GrGLContextInfo& ctxInfo, const GrGLInterface* interface);
/**
* Call to note that a color config has been verified as a valid color
@@ -159,10 +176,10 @@ public:
FBFetchType fbFetchType() const { return fFBFetchType; }
- /**
- * Returs a string containeng the caps info.
- */
- virtual SkString dump() const SK_OVERRIDE;
+ InvalidateFBType invalidateFBType() const { return fInvalidateFBType; }
+
+ /// What type of buffer mapping is supported?
+ MapBufferType mapBufferType() const { return fMapBufferType; }
/**
* Gets an array of legal stencil formats. These formats are not guaranteed
@@ -188,9 +205,6 @@ public:
/// ES requires an extension to support RGBA8 in RenderBufferStorage
bool rgba8RenderbufferSupport() const { return fRGBA8RenderbufferSupport; }
- /// Is GL_BGRA supported
- bool bgraFormatSupport() const { return fBGRAFormatSupport; }
-
/**
* Depending on the ES extensions present the BGRA external format may
* correspond either a BGRA or RGBA internalFormat. On desktop GL it is
@@ -243,13 +257,29 @@ public:
bool isCoreProfile() const { return fIsCoreProfile; }
- bool fixedFunctionSupport() const { return fFixedFunctionSupport; }
-
- /// Is there support for discarding the frame buffer
- bool discardFBSupport() const { return fDiscardFBSupport; }
bool fullClearIsFree() const { return fFullClearIsFree; }
+ bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
+
+ /**
+ * Returns a string containing the caps info.
+ */
+ virtual SkString dump() const SK_OVERRIDE;
+
+ /**
+ * LATC can appear under one of three possible names. In order to know
+ * which GL internal format to use, we need to keep track of which name
+ * we found LATC under. The default is LATC.
+ */
+ enum LATCAlias {
+ kLATC_LATCAlias,
+ kRGTC_LATCAlias,
+ k3DC_LATCAlias
+ };
+
+ LATCAlias latcAlias() const { return fLATCAlias; }
+
private:
/**
* Maintains a bit per GrPixelConfig. It is used to avoid redundantly
@@ -292,6 +322,7 @@ private:
void initStencilFormats(const GrGLContextInfo&);
// This must be called after initFSAASupport().
void initConfigRenderableTable(const GrGLContextInfo&);
+ void initConfigTexturableTable(const GrGLContextInfo&, const GrGLInterface*);
// tracks configs that have been verified to pass the FBO completeness when
// used as a color attachment
@@ -308,12 +339,13 @@ private:
int fMaxFragmentTextureUnits;
int fMaxFixedFunctionTextureCoords;
- MSFBOType fMSFBOType;
-
- FBFetchType fFBFetchType;
+ MSFBOType fMSFBOType;
+ FBFetchType fFBFetchType;
+ InvalidateFBType fInvalidateFBType;
+ MapBufferType fMapBufferType;
+ LATCAlias fLATCAlias;
bool fRGBA8RenderbufferSupport : 1;
- bool fBGRAFormatSupport : 1;
bool fBGRAIsInternalFormat : 1;
bool fTextureSwizzleSupport : 1;
bool fUnpackRowLengthSupport : 1;
@@ -329,9 +361,8 @@ private:
bool fVertexArrayObjectSupport : 1;
bool fUseNonVBOVertexAndIndexDynamicData : 1;
bool fIsCoreProfile : 1;
- bool fFixedFunctionSupport : 1;
- bool fDiscardFBSupport : 1;
bool fFullClearIsFree : 1;
+ bool fDropsTileOnZeroDivide : 1;
typedef GrDrawTargetCaps INHERITED;
};