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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: blimp/engine/renderer/blimp_remote_compositor_bridge.h
diff --git a/blimp/engine/renderer/blimp_remote_compositor_bridge.h b/blimp/engine/renderer/blimp_remote_compositor_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..bfb36549900f25bc5826eec57913578bf90a55ae
--- /dev/null
+++ b/blimp/engine/renderer/blimp_remote_compositor_bridge.h
@@ -0,0 +1,55 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
+#define BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "blimp/engine/renderer/frame_scheduler.h"
+#include "cc/blimp/remote_compositor_bridge.h"
+#include "cc/trees/remote_proto_channel.h"
+
+namespace blimp {
+namespace engine {
+
+class BlimpRemoteCompositorBridge
+ : public cc::RemoteCompositorBridge,
+ public cc::RemoteProtoChannel::ProtoReceiver,
+ public FrameSchedulerClient {
+ public:
+ // TODO(khushalsagar): Stop using the RemoteProtoChannel. See
+ // crbug.com/653697.
+ // |remote_proto_channel| should outlive the BlimpRemoteCompositorBridge.
+ BlimpRemoteCompositorBridge(
+ cc::RemoteProtoChannel* remote_proto_channel,
+ scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner);
+ ~BlimpRemoteCompositorBridge() override;
+
+ // cc::RemoteCompositorBridge implementation.
+ void BindToClient(cc::RemoteCompositorBridgeClient* client) override;
+ void ScheduleMainFrame() override;
+ void ProcessCompositorStateUpdate(std::unique_ptr<cc::CompositorProtoState>
+ compositor_proto_state) override;
+
+ private:
+ // cc::RemoteProtoChannel::ProtoReceiver implementation.
+ void OnProtoReceived(
+ std::unique_ptr<cc::proto::CompositorMessage> proto) override;
+
+ // FrameSchedulerClient implementation.
+ void StartFrameUpdate() override;
+
+ cc::RemoteProtoChannel* remote_proto_channel_;
+ cc::RemoteCompositorBridgeClient* client_ = nullptr;
+
+ FrameScheduler scheduler_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlimpRemoteCompositorBridge);
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_RENDERER_BLIMP_REMOTE_COMPOSITOR_BRIDGE_H_
« no previous file with comments | « blimp/engine/renderer/blimp_content_renderer_client.cc ('k') | blimp/engine/renderer/blimp_remote_compositor_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698