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

Side by Side Diff: cc/test/fake_remote_compositor_bridge.cc

Issue 2646623002: cc: Remove all blimp code from cc. (Closed)
Patch Set: test build Created 3 years, 11 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
« no previous file with comments | « cc/test/fake_remote_compositor_bridge.h ('k') | cc/test/layer_tree_host_remote_for_testing.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "cc/test/fake_remote_compositor_bridge.h"
6
7 #include "base/bind.h"
8 #include "base/logging.h"
9 #include "base/single_thread_task_runner.h"
10 #include "cc/blimp/remote_compositor_bridge_client.h"
11
12 namespace cc {
13
14 FakeRemoteCompositorBridge::FakeRemoteCompositorBridge(
15 scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner)
16 : RemoteCompositorBridge(std::move(compositor_main_task_runner)),
17 client_(nullptr),
18 weak_factory_(this) {}
19
20 FakeRemoteCompositorBridge::~FakeRemoteCompositorBridge() {}
21
22 void FakeRemoteCompositorBridge::BindToClient(
23 RemoteCompositorBridgeClient* client) {
24 DCHECK(!client_);
25 client_ = client;
26 }
27
28 void FakeRemoteCompositorBridge::ScheduleMainFrame() {
29 DCHECK(!has_pending_update_);
30 has_pending_update_ = true;
31
32 compositor_main_task_runner_->PostTask(
33 FROM_HERE, base::Bind(&FakeRemoteCompositorBridge::BeginMainFrame,
34 weak_factory_.GetWeakPtr()));
35 }
36
37 void FakeRemoteCompositorBridge::BeginMainFrame() {
38 DCHECK(has_pending_update_);
39 has_pending_update_ = false;
40
41 client_->BeginMainFrame();
42 }
43
44 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_remote_compositor_bridge.h ('k') | cc/test/layer_tree_host_remote_for_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698