| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ | 5 #ifndef WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ |
| 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ | 6 #define WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 using WebKit::WGC3Dsizei; | 32 using WebKit::WGC3Dsizei; |
| 33 using WebKit::WGC3Duint; | 33 using WebKit::WGC3Duint; |
| 34 using WebKit::WGC3Dfloat; | 34 using WebKit::WGC3Dfloat; |
| 35 using WebKit::WGC3Dclampf; | 35 using WebKit::WGC3Dclampf; |
| 36 using WebKit::WGC3Dintptr; | 36 using WebKit::WGC3Dintptr; |
| 37 using WebKit::WGC3Dsizeiptr; | 37 using WebKit::WGC3Dsizeiptr; |
| 38 | 38 |
| 39 using WebKit::WebGLId; | 39 using WebKit::WebGLId; |
| 40 | 40 |
| 41 using WebKit::WebString; | 41 using WebKit::WebString; |
| 42 using WebKit::WebView; | |
| 43 | 42 |
| 44 using WebKit::WebGraphicsContext3D; | 43 using WebKit::WebGraphicsContext3D; |
| 45 | 44 |
| 46 namespace webkit { | 45 namespace webkit { |
| 47 namespace gpu { | 46 namespace gpu { |
| 48 | 47 |
| 49 // The default implementation of WebGL. In Chromium, using this class | 48 // The default implementation of WebGL. In Chromium, using this class |
| 50 // requires the sandbox to be disabled, which is strongly discouraged. | 49 // requires the sandbox to be disabled, which is strongly discouraged. |
| 51 // It is provided for support of test_shell and any Chromium ports | 50 // It is provided for support of test_shell and any Chromium ports |
| 52 // where an in-renderer WebGL implementation would be helpful. | 51 // where an in-renderer WebGL implementation would be helpful. |
| 53 | 52 |
| 54 class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { | 53 class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { |
| 55 public: | 54 public: |
| 56 // Creates a WebGraphicsContext3DInProcessImpl for a given window. If window | 55 // Creates a WebGraphicsContext3DInProcessImpl for a given window. If window |
| 57 // is gfx::kNullPluginWindow, then it creates an offscreen context. | 56 // is gfx::kNullPluginWindow, then it creates an offscreen context. |
| 58 // share_group is the group this context shares namespaces with. It's only | 57 // share_group is the group this context shares namespaces with. It's only |
| 59 // used for window-bound countexts. | 58 // used for window-bound countexts. |
| 60 WebGraphicsContext3DInProcessImpl(gfx::GLSurface* surface, | 59 WebGraphicsContext3DInProcessImpl(gfx::GLSurface* surface, |
| 61 gfx::GLContext* context, | 60 gfx::GLContext* context, |
| 62 bool render_directly_to_webview); | 61 bool render_directly_to_webview); |
| 63 virtual ~WebGraphicsContext3DInProcessImpl(); | 62 virtual ~WebGraphicsContext3DInProcessImpl(); |
| 64 static WebGraphicsContext3DInProcessImpl* CreateForWebView( | 63 static WebGraphicsContext3DInProcessImpl* CreateForWebView( |
| 65 WebGraphicsContext3D::Attributes attributes, | 64 WebGraphicsContext3D::Attributes attributes, |
| 66 WebView* web_view, | |
| 67 bool render_directly_to_webview); | 65 bool render_directly_to_webview); |
| 68 static WebGraphicsContext3DInProcessImpl* CreateForWindow( | 66 static WebGraphicsContext3DInProcessImpl* CreateForWindow( |
| 69 WebGraphicsContext3D::Attributes attributes, | 67 WebGraphicsContext3D::Attributes attributes, |
| 70 gfx::AcceleratedWidget window, | 68 gfx::AcceleratedWidget window, |
| 71 gfx::GLShareGroup* share_group); | 69 gfx::GLShareGroup* share_group); |
| 72 | 70 |
| 73 //---------------------------------------------------------------------- | 71 //---------------------------------------------------------------------- |
| 74 // WebGraphicsContext3D methods | 72 // WebGraphicsContext3D methods |
| 75 virtual bool makeContextCurrent(); | 73 virtual bool makeContextCurrent(); |
| 76 | 74 |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 ShaderSourceMap shader_source_map_; | 531 ShaderSourceMap shader_source_map_; |
| 534 | 532 |
| 535 ShHandle fragment_compiler_; | 533 ShHandle fragment_compiler_; |
| 536 ShHandle vertex_compiler_; | 534 ShHandle vertex_compiler_; |
| 537 }; | 535 }; |
| 538 | 536 |
| 539 } // namespace gpu | 537 } // namespace gpu |
| 540 } // namespace webkit | 538 } // namespace webkit |
| 541 | 539 |
| 542 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ | 540 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ |
| OLD | NEW |