summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/GLES2Context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/GLES2Context.cpp')
-rw-r--r--WebKit/chromium/src/GLES2Context.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp
index 9dd4eff..b6d619c 100644
--- a/WebKit/chromium/src/GLES2Context.cpp
+++ b/WebKit/chromium/src/GLES2Context.cpp
@@ -47,6 +47,8 @@
// WebGLES2Context. This is done so we have a place to inject an
// implementation which creates the GL ES context.
+using namespace WebKit;
+
namespace WebCore {
class GLES2ContextInternal {
@@ -56,23 +58,20 @@ public:
bool initialize(Page*);
- WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl.get(); }
+ WebGLES2Context* getWebGLES2Context() { return m_impl; }
private:
- OwnPtr<WebKit::WebGLES2Context> m_impl;
+ WebGLES2Context* m_impl;
};
bool GLES2ContextInternal::initialize(Page* page)
{
- m_impl = WebKit::webKitClient()->createGLES2Context();
+ ASSERT(page);
+ WebViewImpl* webView = WebViewImpl::fromPage(page);
+ m_impl = webView->gles2Context();
if (!m_impl)
return false;
- WebKit::WebViewImpl* webView = WebKit::WebViewImpl::fromPage(page);
- if (!m_impl->initialize(webView)) {
- m_impl.clear();
- return false;
- }
return true;
}
@@ -94,7 +93,7 @@ GLES2Context::~GLES2Context()
bool GLES2Context::makeCurrent()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->makeCurrent();
@@ -102,7 +101,7 @@ bool GLES2Context::makeCurrent()
bool GLES2Context::destroy()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->destroy();
@@ -110,7 +109,7 @@ bool GLES2Context::destroy()
bool GLES2Context::swapBuffers()
{
- WebKit::WebGLES2Context* webContext = m_internal->getWebGLES2Context();
+ WebGLES2Context* webContext = m_internal->getWebGLES2Context();
if (!webContext)
return false;
return webContext->swapBuffers();