diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 21:17:42 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 21:17:42 +0000 |
commit | 16e2521bfb6ba86bd5b960cb94809e68806b4539 (patch) | |
tree | 7bfa129eb4955912295cfb242697683a9de335b4 /webkit/gpu/webgraphicscontext3d_in_process_impl.h | |
parent | 451e966ba1bf1d93191898c4d94eb42bdee20cc7 (diff) | |
download | chromium_src-16e2521bfb6ba86bd5b960cb94809e68806b4539.zip chromium_src-16e2521bfb6ba86bd5b960cb94809e68806b4539.tar.gz chromium_src-16e2521bfb6ba86bd5b960cb94809e68806b4539.tar.bz2 |
Allow a window to be passed to WebGraphicsContext3DInProcessImpl
BUG=None
TEST=Webkit compositor in browser process
Review URL: http://codereview.chromium.org/8202021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu/webgraphicscontext3d_in_process_impl.h')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_impl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h index eb7cc5d..1bc447f 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h @@ -13,6 +13,7 @@ #include "third_party/angle/include/GLSLANG/ShaderLang.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "ui/gfx/native_widget_types.h" #if !defined(OS_MACOSX) #define FLIP_FRAMEBUFFER_VERTICALLY @@ -51,7 +52,9 @@ namespace gpu { class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { public: - WebGraphicsContext3DInProcessImpl(); + // Creates a WebGraphicsContext3DInProcessImpl for a given window. If window + // is gfx::kNullPluginWindow, then it creates an offscreen context. + WebGraphicsContext3DInProcessImpl(gfx::PluginWindowHandle window); virtual ~WebGraphicsContext3DInProcessImpl(); //---------------------------------------------------------------------- @@ -423,6 +426,9 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { typedef base::hash_map<WebGLId, ShaderSourceEntry*> ShaderSourceMap; + bool AllocateOffscreenFrameBuffer(int width, int height); + void ClearRenderTarget(); + #ifdef FLIP_FRAMEBUFFER_VERTICALLY void FlipVertically(unsigned char* framebuffer, unsigned int width, @@ -484,6 +490,7 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { ShHandle fragment_compiler_; ShHandle vertex_compiler_; + gfx::PluginWindowHandle window_; }; } // namespace gpu |