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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put OffscreenContext class in content/common/gpu/client for renderer Created 7 years, 10 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include "cc/layer_tree_host_client.h" 8 #include "cc/layer_tree_host_client.h"
9 #include "cc/layer_tree_settings.h" 9 #include "cc/layer_tree_settings.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // cc::LayerTreeHostClient implementation. 71 // cc::LayerTreeHostClient implementation.
72 virtual void willBeginFrame() OVERRIDE; 72 virtual void willBeginFrame() OVERRIDE;
73 virtual void didBeginFrame() OVERRIDE; 73 virtual void didBeginFrame() OVERRIDE;
74 virtual void animate(double monotonic_frame_begin_time) OVERRIDE; 74 virtual void animate(double monotonic_frame_begin_time) OVERRIDE;
75 virtual void layout() OVERRIDE; 75 virtual void layout() OVERRIDE;
76 virtual void applyScrollAndScale(gfx::Vector2d scroll_delta, 76 virtual void applyScrollAndScale(gfx::Vector2d scroll_delta,
77 float page_scale) OVERRIDE; 77 float page_scale) OVERRIDE;
78 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; 78 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE;
79 virtual void didRecreateOutputSurface(bool success) OVERRIDE; 79 virtual void didRecreateOutputSurface(bool success) OVERRIDE;
80 virtual WebKit::WebGraphicsContext3D* offscreenContext3dForMainThread()
81 OVERRIDE;
82 virtual WebKit::WebGraphicsContext3D* offscreenContext3dForCompositorThread()
83 OVERRIDE;
84 virtual GrContext* offscreenGrContextForMainThread() OVERRIDE;
85 virtual GrContext* offscreenGrContextForCompositorThread() OVERRIDE;
80 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; 86 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE;
81 virtual void willCommit() OVERRIDE; 87 virtual void willCommit() OVERRIDE;
82 virtual void didCommit() OVERRIDE; 88 virtual void didCommit() OVERRIDE;
83 virtual void didCommitAndDrawFrame() OVERRIDE; 89 virtual void didCommitAndDrawFrame() OVERRIDE;
84 virtual void didCompleteSwapBuffers() OVERRIDE; 90 virtual void didCompleteSwapBuffers() OVERRIDE;
85 virtual void scheduleComposite() OVERRIDE; 91 virtual void scheduleComposite() OVERRIDE;
86 virtual scoped_ptr<cc::FontAtlas> createFontAtlas() OVERRIDE; 92 virtual scoped_ptr<cc::FontAtlas> createFontAtlas() OVERRIDE;
87 93
88 private: 94 private:
89 RenderWidgetCompositor(RenderWidget* widget, 95 RenderWidgetCompositor(RenderWidget* widget,
90 WebKit::WebLayerTreeViewClient* client); 96 WebKit::WebLayerTreeViewClient* client);
91 97
92 bool initialize(cc::LayerTreeSettings settings); 98 bool initialize(cc::LayerTreeSettings settings);
93 99
94 bool threaded_; 100 bool threaded_;
95 RenderWidget* widget_; 101 RenderWidget* widget_;
96 WebKit::WebLayerTreeViewClient* client_; 102 WebKit::WebLayerTreeViewClient* client_;
97 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 103 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
98 }; 104 };
99 105
100 } // namespace content 106 } // namespace content
101 107
102 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 108 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
103 109
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698