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

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

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet anther rebase (YAR!!!) Created 5 years, 4 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ 6 #define COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "cc/trees/layer_tree_host_client.h" 13 #include "cc/trees/layer_tree_host_client.h"
14 #include "components/view_manager/public/interfaces/gpu.mojom.h" 14 #include "components/view_manager/public/interfaces/gpu.mojom.h"
15 #include "components/view_manager/public/interfaces/surfaces.mojom.h" 15 #include "components/view_manager/public/interfaces/surfaces.mojom.h"
16 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
16 #include "mojo/cc/output_surface_mojo.h" 17 #include "mojo/cc/output_surface_mojo.h"
17 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" 18 #include "third_party/WebKit/public/platform/WebLayerTreeView.h"
18 19
19 namespace base { 20 namespace base {
20 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
21 } 22 }
22 23
23 namespace blink { 24 namespace blink {
24 class WebWidget; 25 class WebWidget;
25 } 26 }
(...skipping 14 matching lines...) Expand all
40 namespace html_viewer { 41 namespace html_viewer {
41 42
42 class WebLayerTreeViewImpl : public blink::WebLayerTreeView, 43 class WebLayerTreeViewImpl : public blink::WebLayerTreeView,
43 public cc::LayerTreeHostClient, 44 public cc::LayerTreeHostClient,
44 public mojo::OutputSurfaceMojoClient { 45 public mojo::OutputSurfaceMojoClient {
45 public: 46 public:
46 WebLayerTreeViewImpl( 47 WebLayerTreeViewImpl(
47 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner, 48 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner,
48 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 49 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
49 cc::TaskGraphRunner* task_graph_runner, 50 cc::TaskGraphRunner* task_graph_runner,
50 mojo::SurfacePtr surface, 51 mojo::CompositorFrameReceiverPtr receiver,
51 mojo::GpuPtr gpu_service); 52 mojo::GpuPtr gpu_service);
52 ~WebLayerTreeViewImpl() override; 53 ~WebLayerTreeViewImpl() override;
53 54
54 void set_widget(blink::WebWidget* widget) { widget_ = widget; } 55 void set_widget(blink::WebWidget* widget) { widget_ = widget; }
55 void set_view(mojo::View* view) { view_ = view; } 56 void set_view(mojo::View* view) { view_ = view; }
56 57
57 // cc::LayerTreeHostClient implementation. 58 // cc::LayerTreeHostClient implementation.
58 void WillBeginMainFrame() override; 59 void WillBeginMainFrame() override;
59 void DidBeginMainFrame() override; 60 void DidBeginMainFrame() override;
60 void BeginMainFrame(const cc::BeginFrameArgs& args) override; 61 void BeginMainFrame(const cc::BeginFrameArgs& args) override;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 main_thread_compositor_task_runner_; 134 main_thread_compositor_task_runner_;
134 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_; 135 base::WeakPtr<WebLayerTreeViewImpl> main_thread_bound_weak_ptr_;
135 136
136 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_; 137 base::WeakPtrFactory<WebLayerTreeViewImpl> weak_factory_;
137 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl); 138 DISALLOW_COPY_AND_ASSIGN(WebLayerTreeViewImpl);
138 }; 139 };
139 140
140 } // namespace html_viewer 141 } // namespace html_viewer
141 142
142 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_ 143 #endif // COMPONENTS_HTML_VIEWER_WEB_LAYER_TREE_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698