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

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

Issue 2755573002: Add FrameGenerator Unit Tests (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | services/ui/ws/BUILD.gn » ('j') | services/ui/ws/frame_generator_unittest.cc » ('J')
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 #ifndef CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
6 #define CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ 6 #define CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "cc/output/compositor_frame_sink.h" 10 #include "cc/output/compositor_frame_sink.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void ReclaimResources(const ReturnedResourceArray& resources) override; 87 void ReclaimResources(const ReturnedResourceArray& resources) override;
88 void WillDrawSurface(const LocalSurfaceId& local_surface_id, 88 void WillDrawSurface(const LocalSurfaceId& local_surface_id,
89 const gfx::Rect& damage_rect) override; 89 const gfx::Rect& damage_rect) override;
90 90
91 // DisplayClient implementation. 91 // DisplayClient implementation.
92 void DisplayOutputSurfaceLost() override; 92 void DisplayOutputSurfaceLost() override;
93 void DisplayWillDrawAndSwap(bool will_draw_and_swap, 93 void DisplayWillDrawAndSwap(bool will_draw_and_swap,
94 const RenderPassList& render_passes) override; 94 const RenderPassList& render_passes) override;
95 void DisplayDidDrawAndSwap() override; 95 void DisplayDidDrawAndSwap() override;
96 96
97 int numder_of_frames_submitted() { return numder_of_frames_submitted_; }
98
97 private: 99 private:
98 // ExternalBeginFrameSource implementation. 100 // ExternalBeginFrameSource implementation.
99 void OnNeedsBeginFrames(bool needs_begin_frames) override; 101 void OnNeedsBeginFrames(bool needs_begin_frames) override;
100 void OnDidFinishFrame(const BeginFrameAck& ack) override; 102 void OnDidFinishFrame(const BeginFrameAck& ack) override;
101 103
102 void SendCompositorFrameAckToClient(); 104 void SendCompositorFrameAckToClient();
103 105
104 const bool synchronous_composite_; 106 const bool synchronous_composite_;
105 const RendererSettings renderer_settings_; 107 const RendererSettings renderer_settings_;
106 108
(...skipping 19 matching lines...) Expand all
126 gfx::Size enlarge_pass_texture_amount_; 128 gfx::Size enlarge_pass_texture_amount_;
127 129
128 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; 130 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
129 131
130 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; 132 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_;
131 }; 133 };
132 134
133 } // namespace cc 135 } // namespace cc
134 136
135 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ 137 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/ws/BUILD.gn » ('j') | services/ui/ws/frame_generator_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698