diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 02:51:07 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-08 02:51:07 +0000 |
commit | 50468f1ead512b8575455766d6874a61be77121d (patch) | |
tree | acba7a7433536cc54b39fd63685036d2b3694c17 /chrome/renderer | |
parent | d53d0aaae59bac04b4c800611ccdaff5ac1825a8 (diff) | |
download | chromium_src-50468f1ead512b8575455766d6874a61be77121d.zip chromium_src-50468f1ead512b8575455766d6874a61be77121d.tar.gz chromium_src-50468f1ead512b8575455766d6874a61be77121d.tar.bz2 |
Expose functions to resize and get the texture ID from offscreen GLES2 contexts
Will be paired with a WebKit-side change to expose these on WebGLES2Context. It's safe to land this patch first, however, since it will just define functions that are not (yet) called.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2842045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/webgles2context_impl.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/webgles2context_impl.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/renderer/webgles2context_impl.cc b/chrome/renderer/webgles2context_impl.cc index 994d750..e3d8f32 100644 --- a/chrome/renderer/webgles2context_impl.cc +++ b/chrome/renderer/webgles2context_impl.cc @@ -75,5 +75,13 @@ bool WebGLES2ContextImpl::swapBuffers() { return ggl::SwapBuffers(context_); } +void WebGLES2ContextImpl::resizeOffscreenContent(int width, int height) { + ggl::ResizeOffscreenContext(context_, gfx::Size(width, height)); +} + +unsigned WebGLES2ContextImpl::getOffscreenContentParentTextureId() { + return ggl::GetParentTextureId(context_); +} + #endif // defined(ENABLE_GPU) diff --git a/chrome/renderer/webgles2context_impl.h b/chrome/renderer/webgles2context_impl.h index 0930124..7ee3a21 100644 --- a/chrome/renderer/webgles2context_impl.h +++ b/chrome/renderer/webgles2context_impl.h @@ -22,6 +22,9 @@ class WebGLES2ContextImpl : public WebKit::WebGLES2Context { virtual bool destroy(); virtual bool swapBuffers(); + virtual void resizeOffscreenContent(int width, int height); + virtual unsigned getOffscreenContentParentTextureId(); + ggl::Context* context() { return context_; } private: |