Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.h

Issue 8301019: Allow specification of the share group in WebGraphicsContext3DInProcessImpl (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "third_party/angle/include/GLSLANG/ShaderLang.h" 13 #include "third_party/angle/include/GLSLANG/ShaderLang.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 #if !defined(OS_MACOSX) 18 #if !defined(OS_MACOSX)
19 #define FLIP_FRAMEBUFFER_VERTICALLY 19 #define FLIP_FRAMEBUFFER_VERTICALLY
20 #endif 20 #endif
21 namespace gfx { 21 namespace gfx {
22 class GLContext; 22 class GLContext;
23 class GLSurface; 23 class GLSurface;
24 class GLShareGroup;
24 } 25 }
25 26
26 using WebKit::WGC3Dchar; 27 using WebKit::WGC3Dchar;
27 using WebKit::WGC3Denum; 28 using WebKit::WGC3Denum;
28 using WebKit::WGC3Dboolean; 29 using WebKit::WGC3Dboolean;
29 using WebKit::WGC3Dbitfield; 30 using WebKit::WGC3Dbitfield;
30 using WebKit::WGC3Dint; 31 using WebKit::WGC3Dint;
31 using WebKit::WGC3Dsizei; 32 using WebKit::WGC3Dsizei;
32 using WebKit::WGC3Duint; 33 using WebKit::WGC3Duint;
33 using WebKit::WGC3Dfloat; 34 using WebKit::WGC3Dfloat;
(...skipping 13 matching lines...) Expand all
47 48
48 // The default implementation of WebGL. In Chromium, using this class 49 // The default implementation of WebGL. In Chromium, using this class
49 // requires the sandbox to be disabled, which is strongly discouraged. 50 // requires the sandbox to be disabled, which is strongly discouraged.
50 // It is provided for support of test_shell and any Chromium ports 51 // It is provided for support of test_shell and any Chromium ports
51 // where an in-renderer WebGL implementation would be helpful. 52 // where an in-renderer WebGL implementation would be helpful.
52 53
53 class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D { 54 class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
54 public: 55 public:
55 // Creates a WebGraphicsContext3DInProcessImpl for a given window. If window 56 // Creates a WebGraphicsContext3DInProcessImpl for a given window. If window
56 // is gfx::kNullPluginWindow, then it creates an offscreen context. 57 // is gfx::kNullPluginWindow, then it creates an offscreen context.
57 WebGraphicsContext3DInProcessImpl(gfx::PluginWindowHandle window); 58 // share_group is the group this context shares namespaces with. It's only
59 // used for window-bound countexts.
60 WebGraphicsContext3DInProcessImpl(gfx::PluginWindowHandle window,
61 gfx::GLShareGroup* share_group);
58 virtual ~WebGraphicsContext3DInProcessImpl(); 62 virtual ~WebGraphicsContext3DInProcessImpl();
59 63
60 //---------------------------------------------------------------------- 64 //----------------------------------------------------------------------
61 // WebGraphicsContext3D methods 65 // WebGraphicsContext3D methods
62 virtual bool initialize( 66 virtual bool initialize(
63 WebGraphicsContext3D::Attributes attributes, WebView*, bool); 67 WebGraphicsContext3D::Attributes attributes, WebView*, bool);
64 virtual bool makeContextCurrent(); 68 virtual bool makeContextCurrent();
65 69
66 virtual int width(); 70 virtual int width();
67 virtual int height(); 71 virtual int height();
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 std::set<WGC3Denum> synthetic_errors_set_; 490 std::set<WGC3Denum> synthetic_errors_set_;
487 491
488 scoped_refptr<gfx::GLContext> gl_context_; 492 scoped_refptr<gfx::GLContext> gl_context_;
489 scoped_refptr<gfx::GLSurface> gl_surface_; 493 scoped_refptr<gfx::GLSurface> gl_surface_;
490 494
491 ShaderSourceMap shader_source_map_; 495 ShaderSourceMap shader_source_map_;
492 496
493 ShHandle fragment_compiler_; 497 ShHandle fragment_compiler_;
494 ShHandle vertex_compiler_; 498 ShHandle vertex_compiler_;
495 gfx::PluginWindowHandle window_; 499 gfx::PluginWindowHandle window_;
500 scoped_refptr<gfx::GLShareGroup> share_group_;
496 }; 501 };
497 502
498 } // namespace gpu 503 } // namespace gpu
499 } // namespace webkit 504 } // namespace webkit
500 505
501 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_ 506 #endif // WEBKIT_GPU_WEBGRAPHICSCONTEXT3D_IN_PROCESS_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698