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

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

Issue 2349743004: cc: Remove things from OutputSurface and CompositorFrameSink. (Closed)
Patch Set: delete-stuff-cfs: comment-and-rebase Created 4 years, 3 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_layer_tree_host_impl_client.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 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()
18 : swap_count_(0), 18 : swap_count_(0),
19 did_lose_compositor_frame_sink_called_(false), 19 did_lose_compositor_frame_sink_called_(false),
20 memory_policy_(0) {} 20 memory_policy_(0) {}
21 21
22 void SetBeginFrameSource(BeginFrameSource* source) override {} 22 void SetBeginFrameSource(BeginFrameSource* source) override {}
23 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
24 void DidSwapBuffersComplete() override; 23 void DidSwapBuffersComplete() override;
25 void DidReceiveTextureInUseResponses(
26 const gpu::TextureInUseResponses& responses) override {}
27 void ReclaimResources(const ReturnedResourceArray& resources) override {} 24 void ReclaimResources(const ReturnedResourceArray& resources) override {}
28 void DidLoseCompositorFrameSink() override; 25 void DidLoseCompositorFrameSink() override;
29 void SetExternalTilePriorityConstraints( 26 void SetExternalTilePriorityConstraints(
30 const gfx::Rect& viewport_rect_for_tile_priority, 27 const gfx::Rect& viewport_rect_for_tile_priority,
31 const gfx::Transform& transform_for_tile_priority) override {} 28 const gfx::Transform& transform_for_tile_priority) override {}
32 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 29 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
33 void SetTreeActivationCallback(const base::Closure&) override {} 30 void SetTreeActivationCallback(const base::Closure&) override {}
34 void OnDraw(const gfx::Transform& transform, 31 void OnDraw(const gfx::Transform& transform,
35 const gfx::Rect& viewport, 32 const gfx::Rect& viewport,
36 bool resourceless_software_draw) override {} 33 bool resourceless_software_draw) override {}
37 34
38 int swap_count() { return swap_count_; } 35 int swap_count() { return swap_count_; }
39 36
40 bool did_lose_compositor_frame_sink_called() { 37 bool did_lose_compositor_frame_sink_called() {
41 return did_lose_compositor_frame_sink_called_; 38 return did_lose_compositor_frame_sink_called_;
42 } 39 }
43 40
44 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; } 41 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; }
45 42
46 private: 43 private:
47 int swap_count_; 44 int swap_count_;
48 bool did_lose_compositor_frame_sink_called_; 45 bool did_lose_compositor_frame_sink_called_;
49 ManagedMemoryPolicy memory_policy_; 46 ManagedMemoryPolicy memory_policy_;
50 }; 47 };
51 48
52 } // namespace cc 49 } // namespace cc
53 50
54 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_CLIENT_H_ 51 #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_layer_tree_host_impl_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698