diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 23:22:26 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 23:22:26 +0000 |
commit | 843da553731628df2ccbbf63975eb9db687f3b25 (patch) | |
tree | 34cc864552e1a87363d1beb65527da752065cf18 /cc/test | |
parent | b2fef9a925d522889fe321e5bba781f4d0e815cd (diff) | |
download | chromium_src-843da553731628df2ccbbf63975eb9db687f3b25.zip chromium_src-843da553731628df2ccbbf63975eb9db687f3b25.tar.gz chromium_src-843da553731628df2ccbbf63975eb9db687f3b25.tar.bz2 |
Expose GLES2Interface to cc
This exposes a gpu::gles2::GLES2Interface pointer to cc through the ContextProvider. This is a way for the compositor to talk to the client side of the command buffer more directly, bypassing the blink::WebGraphicsContext3D indirection. See the bug for the plan for using this new interface and deprecating WGC3D.
BUG=181120
Review URL: https://codereview.chromium.org/54463007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/DEPS | 2 | ||||
-rw-r--r-- | cc/test/test_context_provider.cc | 8 | ||||
-rw-r--r-- | cc/test/test_context_provider.h | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/cc/test/DEPS b/cc/test/DEPS index 8a37ff9e..8f04cc2 100644 --- a/cc/test/DEPS +++ b/cc/test/DEPS @@ -1,5 +1,5 @@ include_rules = [ - "+ui/gl/", + "+gpu/command_buffer/client/gles2_interface_stub.h", # TODO(jamesr): Remove once cc depends on GLES2Interface instead of WGC3D "+webkit/common/gpu", ] diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc index af1e12d..8484b38 100644 --- a/cc/test/test_context_provider.cc +++ b/cc/test/test_context_provider.cc @@ -120,6 +120,14 @@ blink::WebGraphicsContext3D* TestContextProvider::Context3d() { return context3d_.get(); } +gpu::gles2::GLES2Interface* TestContextProvider::ContextGL() { + DCHECK(context3d_); + DCHECK(bound_); + DCHECK(context_thread_checker_.CalledOnValidThread()); + + return &context_gl_stub_; +} + gpu::ContextSupport* TestContextProvider::ContextSupport() { DCHECK(bound_); DCHECK(context_thread_checker_.CalledOnValidThread()); diff --git a/cc/test/test_context_provider.h b/cc/test/test_context_provider.h index c708180..81167c6 100644 --- a/cc/test/test_context_provider.h +++ b/cc/test/test_context_provider.h @@ -11,6 +11,7 @@ #include "base/threading/thread_checker.h" #include "cc/output/context_provider.h" #include "cc/test/test_context_support.h" +#include "gpu/command_buffer/client/gles2_interface_stub.h" namespace blink { class WebGraphicsContext3D; } @@ -29,6 +30,7 @@ class TestContextProvider : public cc::ContextProvider { virtual bool BindToCurrentThread() OVERRIDE; virtual Capabilities ContextCapabilities() OVERRIDE; virtual blink::WebGraphicsContext3D* Context3d() OVERRIDE; + virtual gpu::gles2::GLES2Interface* ContextGL() OVERRIDE; virtual gpu::ContextSupport* ContextSupport() OVERRIDE; virtual class GrContext* GrContext() OVERRIDE; virtual bool IsContextLost() OVERRIDE; @@ -62,6 +64,7 @@ class TestContextProvider : public cc::ContextProvider { TestContextSupport support_; scoped_ptr<TestWebGraphicsContext3D> context3d_; + gpu::gles2::GLES2InterfaceStub context_gl_stub_; bool bound_; base::ThreadChecker main_thread_checker_; |