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

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.h

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webkit/gpu/webgraphicscontext3d_in_process_impl.h
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index 4603afbc71ec548daecc7e9f88629555491e889c..5cedb752c9466d695ef03ca2010a0cd6766932bf 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -57,14 +57,21 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
// is gfx::kNullPluginWindow, then it creates an offscreen context.
// share_group is the group this context shares namespaces with. It's only
// used for window-bound countexts.
- WebGraphicsContext3DInProcessImpl(gfx::PluginWindowHandle window,
- gfx::GLShareGroup* share_group);
+ WebGraphicsContext3DInProcessImpl(gfx::GLSurface* surface,
+ gfx::GLContext* context,
+ bool render_directly_to_webview);
virtual ~WebGraphicsContext3DInProcessImpl();
+ static WebGraphicsContext3DInProcessImpl* CreateForWebView(
+ WebGraphicsContext3D::Attributes attributes,
+ WebView* web_view,
+ bool render_directly_to_webview);
+ static WebGraphicsContext3DInProcessImpl* CreateForWindow(
+ WebGraphicsContext3D::Attributes attributes,
+ gfx::PluginWindowHandle window,
+ gfx::GLShareGroup* share_group);
//----------------------------------------------------------------------
// WebGraphicsContext3D methods
- virtual bool initialize(
- WebGraphicsContext3D::Attributes attributes, WebView*, bool);
virtual bool makeContextCurrent();
virtual int width();
@@ -456,6 +463,8 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
#endif
private:
+ bool Initialize(Attributes attributes);
+
// ANGLE related.
struct ShaderSourceEntry;
@@ -522,8 +531,6 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
ShHandle fragment_compiler_;
ShHandle vertex_compiler_;
- gfx::PluginWindowHandle window_;
- scoped_refptr<gfx::GLShareGroup> share_group_;
};
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698