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

Side by Side Diff: cc/test/fake_compositor_frame_sink_client.h

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/test/fake_compositor_frame_sink.cc ('k') | cc/test/fake_compositor_frame_sink_client.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_ 5 #ifndef CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_
6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_ 6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_
7 7
8 #include "cc/output/compositor_frame_sink_client.h" 8 #include "cc/output/compositor_frame_sink_client.h"
9 #include "cc/output/managed_memory_policy.h" 9 #include "cc/output/managed_memory_policy.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 class CompositorFrameSink; 13 class CompositorFrameSink;
14 14
15 class FakeCompositorFrameSinkClient : public CompositorFrameSinkClient { 15 class FakeCompositorFrameSinkClient : public CompositorFrameSinkClient {
16 public: 16 public:
17 FakeCompositorFrameSinkClient() 17 FakeCompositorFrameSinkClient() : memory_policy_(0) {}
18 : swap_count_(0),
19 did_lose_compositor_frame_sink_called_(false),
20 memory_policy_(0) {}
21 18
22 void SetBeginFrameSource(BeginFrameSource* source) override {} 19 void SetBeginFrameSource(BeginFrameSource* source) override {}
23 void DidSwapBuffersComplete() override; 20 void DidReceiveCompositorFrameAck() override;
24 void ReclaimResources(const ReturnedResourceArray& resources) override {} 21 void ReclaimResources(const ReturnedResourceArray& resources) override {}
25 void DidLoseCompositorFrameSink() override; 22 void DidLoseCompositorFrameSink() override;
26 void SetExternalTilePriorityConstraints( 23 void SetExternalTilePriorityConstraints(
27 const gfx::Rect& viewport_rect_for_tile_priority, 24 const gfx::Rect& viewport_rect_for_tile_priority,
28 const gfx::Transform& transform_for_tile_priority) override {} 25 const gfx::Transform& transform_for_tile_priority) override {}
29 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 26 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
30 void SetTreeActivationCallback(const base::Closure&) override {} 27 void SetTreeActivationCallback(const base::Closure&) override {}
31 void OnDraw(const gfx::Transform& transform, 28 void OnDraw(const gfx::Transform& transform,
32 const gfx::Rect& viewport, 29 const gfx::Rect& viewport,
33 bool resourceless_software_draw) override {} 30 bool resourceless_software_draw) override {}
34 31
35 int swap_count() { return swap_count_; } 32 int ack_count() { return ack_count_; }
36 33
37 bool did_lose_compositor_frame_sink_called() { 34 bool did_lose_compositor_frame_sink_called() {
38 return did_lose_compositor_frame_sink_called_; 35 return did_lose_compositor_frame_sink_called_;
39 } 36 }
40 37
41 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; } 38 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; }
42 39
43 private: 40 private:
44 int swap_count_; 41 int ack_count_ = 0;
45 bool did_lose_compositor_frame_sink_called_; 42 bool did_lose_compositor_frame_sink_called_ = false;
46 ManagedMemoryPolicy memory_policy_; 43 ManagedMemoryPolicy memory_policy_;
47 }; 44 };
48 45
49 } // namespace cc 46 } // namespace cc
50 47
51 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_ 48 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/test/fake_compositor_frame_sink.cc ('k') | cc/test/fake_compositor_frame_sink_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698