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

Side by Side Diff: blimp/engine/renderer/blimp_remote_compositor_bridge.h

Issue 2413063002: content/blimp: Set up hooks for enabling LTHRemote in the renderer. (Closed)
Patch Set: Rebase Created 4 years, 2 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 2016 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 BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
6 #define BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "blimp/engine/renderer/scheduler.h"
11 #include "cc/blimp/remote_compositor_bridge.h"
12 #include "cc/trees/remote_proto_channel.h"
13
14 namespace blimp {
15 namespace engine {
16
17 class BlimpRemoteCompositorBridge
18 : public cc::RemoteCompositorBridge,
19 public cc::RemoteProtoChannel::ProtoReceiver,
20 public SchedulerClient {
21 public:
22 // TODO(khushalsagar): Stop using the RemoteProtoChannel. See
23 // crbug.com/653697.
24 BlimpRemoteCompositorBridge(
25 cc::RemoteProtoChannel* remote_proto_channel,
Wez 2016/10/19 22:15:27 nit: Clarify ownership/lifetime of this?
Khushal 2016/10/20 01:29:33 Done.
26 scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner);
27 ~BlimpRemoteCompositorBridge() override;
28
29 // cc::RemoteCompositorBridge implementation.
30 void BindToClient(cc::RemoteCompositorBridgeClient* client) override;
31 void ScheduleMainFrame() override;
32 void ProcessCompositorStateUpdate(std::unique_ptr<cc::CompositorProtoState>
33 compositor_proto_state) override;
34
35 private:
36 // cc::RemoteProtoChannel::ProtoReceiver implementation.
37 void OnProtoReceived(
38 std::unique_ptr<cc::proto::CompositorMessage> proto) override;
39
40 // SchedulerClient implementation.
41 void StartFrameUpdate() override;
42
43 cc::RemoteProtoChannel* remote_proto_channel_;
44 cc::RemoteCompositorBridgeClient* client_ = nullptr;
45
46 Scheduler scheduler_;
47
48 DISALLOW_COPY_AND_ASSIGN(BlimpRemoteCompositorBridge);
49 };
50
51 } // namespace engine
52 } // namespace blimp
53
54 #endif // BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698