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

Side by Side Diff: blimp/client/feature/compositor/blimp_compositor.h

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: Created 4 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ 5 #ifndef BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_
6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ 6 #define BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "blimp/client/core/compositor/blimp_output_surface.h" 12 #include "blimp/client/core/compositor/blimp_output_surface.h"
13 #include "blimp/client/feature/compositor/blimp_input_manager.h" 13 #include "blimp/client/feature/compositor/blimp_input_manager.h"
14 #include "blimp/client/public/compositor/compositor_dependencies.h"
14 #include "cc/surfaces/surface_factory_client.h" 15 #include "cc/surfaces/surface_factory_client.h"
15 #include "cc/trees/layer_tree_host.h" 16 #include "cc/trees/layer_tree_host.h"
16 #include "cc/trees/layer_tree_host_client.h" 17 #include "cc/trees/layer_tree_host_client.h"
17 #include "cc/trees/layer_tree_settings.h" 18 #include "cc/trees/layer_tree_settings.h"
18 #include "cc/trees/remote_proto_channel.h" 19 #include "cc/trees/remote_proto_channel.h"
19 #include "ui/gfx/geometry/size.h" 20 #include "ui/gfx/geometry/size.h"
20 #include "ui/gfx/native_widget_types.h" 21 #include "ui/gfx/native_widget_types.h"
21 22
22 namespace base { 23 namespace base {
23 class SingleThreadTaskRunner; 24 class SingleThreadTaskRunner;
(...skipping 15 matching lines...) Expand all
39 class SurfaceId; 40 class SurfaceId;
40 class SurfaceIdAllocator; 41 class SurfaceIdAllocator;
41 } // namespace cc 42 } // namespace cc
42 43
43 namespace blimp { 44 namespace blimp {
44 class BlimpMessage; 45 class BlimpMessage;
45 46
46 namespace client { 47 namespace client {
47 48
48 class BlimpCompositorDependencies; 49 class BlimpCompositorDependencies;
49 class CompositorDependencies;
50 50
51 // The BlimpCompositorClient provides the BlimpCompositor with the necessary 51 // The BlimpCompositorClient provides the BlimpCompositor with the necessary
52 // dependencies for cc::LayerTreeHost owned by this compositor and for 52 // dependencies for cc::LayerTreeHost owned by this compositor and for
53 // communicating the compositor and input messages to the corresponding 53 // communicating the compositor and input messages to the corresponding
54 // render widget of this compositor on the engine. 54 // render widget of this compositor on the engine.
55 class BlimpCompositorClient { 55 class BlimpCompositorClient {
56 public: 56 public:
57 // Should send web gesture events which could not be handled locally by the 57 // Should send web gesture events which could not be handled locally by the
58 // compositor to the engine. 58 // compositor to the engine.
59 virtual void SendWebGestureEvent( 59 virtual void SendWebGestureEvent(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Called to forward the compositor message from the remote server 100 // Called to forward the compositor message from the remote server
101 // LayerTreeHost of the render widget for this compositor. 101 // LayerTreeHost of the render widget for this compositor.
102 // virtual for testing. 102 // virtual for testing.
103 virtual void OnCompositorMessageReceived( 103 virtual void OnCompositorMessageReceived(
104 std::unique_ptr<cc::proto::CompositorMessage> message); 104 std::unique_ptr<cc::proto::CompositorMessage> message);
105 105
106 // Called when the a ContextProvider has been created by the 106 // Called when the a ContextProvider has been created by the
107 // CompositorDependencies class. If |host_| is waiting on an OutputSurface 107 // CompositorDependencies class. If |host_| is waiting on an OutputSurface
108 // this will build one for it. 108 // this will build one for it.
109 void OnContextProviderCreated( 109 void OnContextProviderCreated(
David Trainor- moved to gerrit 2016/08/31 00:28:58 Provider -> Providers?
Khushal 2016/08/31 21:22:50 Done.
110 const scoped_refptr<cc::ContextProvider>& provider); 110 const blimp::client::CompositorDependencies::ContextProviders&
111 context_providers);
111 112
112 scoped_refptr<cc::Layer> layer() const { return layer_; } 113 scoped_refptr<cc::Layer> layer() const { return layer_; }
113 114
114 int render_widget_id() const { return render_widget_id_; } 115 int render_widget_id() const { return render_widget_id_; }
115 116
116 private: 117 private:
117 friend class BlimpCompositorForTesting; 118 friend class BlimpCompositorForTesting;
118 119
119 // LayerTreeHostClient implementation. 120 // LayerTreeHostClient implementation.
120 void WillBeginMainFrame() override {} 121 void WillBeginMainFrame() override {}
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 218
218 base::WeakPtrFactory<BlimpCompositor> weak_ptr_factory_; 219 base::WeakPtrFactory<BlimpCompositor> weak_ptr_factory_;
219 220
220 DISALLOW_COPY_AND_ASSIGN(BlimpCompositor); 221 DISALLOW_COPY_AND_ASSIGN(BlimpCompositor);
221 }; 222 };
222 223
223 } // namespace client 224 } // namespace client
224 } // namespace blimp 225 } // namespace blimp
225 226
226 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_ 227 #endif // BLIMP_CLIENT_FEATURE_COMPOSITOR_BLIMP_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698