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

Side by Side Diff: cc/blimp/layer_tree_host_remote_unittest.cc

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: 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
« no previous file with comments | « cc/blimp/layer_tree_host_remote.cc ('k') | cc/output/compositor_frame_sink.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/blimp/layer_tree_host_remote.h" 5 #include "cc/blimp/layer_tree_host_remote.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 14 matching lines...) Expand all
25 EXPECT_CALL(client, WillBeginMainFrame()).Times(num); \ 25 EXPECT_CALL(client, WillBeginMainFrame()).Times(num); \
26 EXPECT_CALL(client, DidReceiveBeginMainFrame()).Times(num); \ 26 EXPECT_CALL(client, DidReceiveBeginMainFrame()).Times(num); \
27 EXPECT_CALL(client, DidUpdateLayerTreeHost()).Times(num); \ 27 EXPECT_CALL(client, DidUpdateLayerTreeHost()).Times(num); \
28 EXPECT_CALL(client, WillCommit()).Times(num); \ 28 EXPECT_CALL(client, WillCommit()).Times(num); \
29 EXPECT_CALL(client, DidCommit()).Times(num); \ 29 EXPECT_CALL(client, DidCommit()).Times(num); \
30 EXPECT_CALL(client, DidBeginMainFrame()).Times(num); 30 EXPECT_CALL(client, DidBeginMainFrame()).Times(num);
31 31
32 #define EXPECT_BEGIN_MAIN_FRAME_AND_COMMIT(client, num) \ 32 #define EXPECT_BEGIN_MAIN_FRAME_AND_COMMIT(client, num) \
33 EXPECT_BEGIN_MAIN_FRAME(client, num) \ 33 EXPECT_BEGIN_MAIN_FRAME(client, num) \
34 EXPECT_CALL(client, DidCommitAndDrawFrame()).Times(num); \ 34 EXPECT_CALL(client, DidCommitAndDrawFrame()).Times(num); \
35 EXPECT_CALL(client, DidCompleteSwapBuffers()).Times(num); 35 EXPECT_CALL(client, DidReceiveCompositorFrameAck()).Times(num);
36 36
37 namespace cc { 37 namespace cc {
38 namespace { 38 namespace {
39 39
40 class UpdateTrackingRemoteCompositorBridge : public FakeRemoteCompositorBridge { 40 class UpdateTrackingRemoteCompositorBridge : public FakeRemoteCompositorBridge {
41 public: 41 public:
42 UpdateTrackingRemoteCompositorBridge( 42 UpdateTrackingRemoteCompositorBridge(
43 scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner) 43 scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner)
44 : FakeRemoteCompositorBridge(std::move(compositor_main_task_runner)) {} 44 : FakeRemoteCompositorBridge(std::move(compositor_main_task_runner)) {}
45 45
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 MOCK_METHOD0(DidUpdateLayerTreeHost, void()); 86 MOCK_METHOD0(DidUpdateLayerTreeHost, void());
87 MOCK_METHOD5(ApplyViewportDeltas, 87 MOCK_METHOD5(ApplyViewportDeltas,
88 void(const gfx::Vector2dF&, 88 void(const gfx::Vector2dF&,
89 const gfx::Vector2dF&, 89 const gfx::Vector2dF&,
90 const gfx::Vector2dF&, 90 const gfx::Vector2dF&,
91 float, 91 float,
92 float)); 92 float));
93 MOCK_METHOD0(WillCommit, void()); 93 MOCK_METHOD0(WillCommit, void());
94 MOCK_METHOD0(DidCommit, void()); 94 MOCK_METHOD0(DidCommit, void());
95 MOCK_METHOD0(DidCommitAndDrawFrame, void()); 95 MOCK_METHOD0(DidCommitAndDrawFrame, void());
96 MOCK_METHOD0(DidCompleteSwapBuffers, void()); 96 MOCK_METHOD0(DidReceiveCompositorFrameAck, void());
97 97
98 private: 98 private:
99 base::Closure update_host_callback_; 99 base::Closure update_host_callback_;
100 }; 100 };
101 101
102 class MockLayer : public Layer { 102 class MockLayer : public Layer {
103 public: 103 public:
104 explicit MockLayer(bool update) : update_(update) {} 104 explicit MockLayer(bool update) : update_(update) {}
105 105
106 bool Update() override { 106 bool Update() override {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 child_layer1->RemoveAllChildren(); 408 child_layer1->RemoveAllChildren();
409 scroll_updates.clear(); 409 scroll_updates.clear();
410 scroll_updates[child_layer2->id()] = gfx::ScrollOffset(3, 2); 410 scroll_updates[child_layer2->id()] = gfx::ScrollOffset(3, 2);
411 updates_applied = 411 updates_applied =
412 remote_compositor_bridge_->SendUpdates(scroll_updates, new_scale_factor); 412 remote_compositor_bridge_->SendUpdates(scroll_updates, new_scale_factor);
413 EXPECT_FALSE(updates_applied); 413 EXPECT_FALSE(updates_applied);
414 } 414 }
415 415
416 } // namespace 416 } // namespace
417 } // namespace cc 417 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blimp/layer_tree_host_remote.cc ('k') | cc/output/compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698