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

Side by Side Diff: components/html_viewer/web_graphics_context_3d_command_buffer_impl.h

Issue 1338433002: Mandoline: Add WebGL support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address review issues Created 5 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_HTML_VIEWER_WEB_GRAPHICS_CONTEXT_3D_COMMAND_BUFFER_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_WEB_GRAPHICS_CONTEXT_3D_COMMAND_BUFFER_IMPL_H_
7
8 #include "base/macros.h"
9 #include "gpu/blink/webgraphicscontext3d_impl.h"
10 #include "mojo/public/c/gles2/gles2.h"
11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
12 #include "third_party/WebKit/public/platform/WebString.h"
13 #include "third_party/mojo/src/mojo/public/cpp/system/core.h"
14 #include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h"
15 #include "url/gurl.h"
16
17 namespace gpu {
18 class ContextSupport;
19 namespace gles2 { class GLES2Interface; }
20 }
21
22 namespace mojo {
23 class ApplicationImpl;
24 } // namespace mojo
25
26 namespace html_viewer {
27
28 class WebGraphicsContext3DCommandBufferImpl
29 : public gpu_blink::WebGraphicsContext3DImpl {
30 public:
31 WebGraphicsContext3DCommandBufferImpl(
32 int surface_id,
33 mojo::ApplicationImpl* app,
34 const GURL& active_url,
35 const blink::WebGraphicsContext3D::Attributes& attributes,
36 blink::WebGraphicsContext3D* shareContext,
37 blink::WebGLInfo* glInfo);
38 virtual ~WebGraphicsContext3DCommandBufferImpl();
39
40 static WebGraphicsContext3DCommandBufferImpl* CreateOffscreenContext(
41 mojo::ApplicationImpl* app,
42 const GURL& active_url,
43 const blink::WebGraphicsContext3D::Attributes& attributes,
44 blink::WebGraphicsContext3D* shareContext,
45 blink::WebGLInfo* glInfo);
46
47 private:
48 static void ContextLostThunk(void* closure) {
49 static_cast<WebGraphicsContext3DCommandBufferImpl*>(closure)->ContextLost();
50 }
51 void ContextLost();
52
53 int surface_id_;
sky 2015/09/15 22:10:58 const
Peng 2015/09/16 13:54:59 Removed it for now.
54
55 mojo::ScopedMessagePipeHandle command_buffer_handle_;
56 MojoGLES2Context gles2_context_;
57 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_;
58
59 DISALLOW_COPY_AND_ASSIGN(WebGraphicsContext3DCommandBufferImpl);
60 };
61
62 } // namespace html_viewer
63
64 #endif // COMPONENTS_HTML_VIEWER_WEB_GRAPHICS_CONTEXT_3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698