aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/gl/SkGLContext.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-26 21:46:32 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-26 21:46:32 +0000
commit1744f97ea73384b9f75b0ccee0a36a213c681d3a (patch)
tree984f3a6988234c1a797049b2a43705cf970c1866 /include/gpu/gl/SkGLContext.h
parent8d33a24cfe4540126ae00618cc691c610d398d8d (diff)
Use glGetStringi to get extensions when available.
Review URL: https://codereview.chromium.org/12328111 git-svn-id: http://skia.googlecode.com/svn/trunk@7872 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/gl/SkGLContext.h')
-rw-r--r--include/gpu/gl/SkGLContext.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h
index 9842fc6bc0..43ae9cdc00 100644
--- a/include/gpu/gl/SkGLContext.h
+++ b/include/gpu/gl/SkGLContext.h
@@ -8,8 +8,8 @@
#ifndef SkGLContext_DEFINED
#define SkGLContext_DEFINED
+#include "GrGLExtensions.h"
#include "GrGLInterface.h"
-#include "SkString.h"
/**
* Create an offscreen opengl context with an RGBA8 / 8bit stencil FBO.
@@ -34,7 +34,10 @@ public:
virtual void makeCurrent() const = 0;
- bool hasExtension(const char* extensionName) const;
+ bool hasExtension(const char* extensionName) const {
+ GrAssert(NULL != fGL);
+ return fExtensions.has(extensionName);
+ }
protected:
/**
@@ -51,7 +54,7 @@ protected:
virtual void destroyGLContext() = 0;
private:
- SkString fExtensionString;
+ GrGLExtensions fExtensions;
GrGLuint fFBO;
GrGLuint fColorBufferID;
GrGLuint fDepthStencilBufferID;