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

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

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

Powered by Google App Engine
This is Rietveld 408576698