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

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

Issue 2854953006: Move disable_display_vsync out of RendererSettings (Closed)
Patch Set: Correct typo Created 3 years, 7 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/layer_tree_test.cc ('k') | cc/test/test_compositor_frame_sink.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 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 public: 50 public:
51 // Pass true for |force_disable_reclaim_resources| to act like the Display 51 // Pass true for |force_disable_reclaim_resources| to act like the Display
52 // is out-of-process and can't return resources synchronously. 52 // is out-of-process and can't return resources synchronously.
53 TestCompositorFrameSink( 53 TestCompositorFrameSink(
54 scoped_refptr<ContextProvider> compositor_context_provider, 54 scoped_refptr<ContextProvider> compositor_context_provider,
55 scoped_refptr<ContextProvider> worker_context_provider, 55 scoped_refptr<ContextProvider> worker_context_provider,
56 SharedBitmapManager* shared_bitmap_manager, 56 SharedBitmapManager* shared_bitmap_manager,
57 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 57 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
58 const RendererSettings& renderer_settings, 58 const RendererSettings& renderer_settings,
59 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
60 bool synchronous_composite); 60 bool synchronous_composite,
61 bool disable_display_vsync);
61 ~TestCompositorFrameSink() override; 62 ~TestCompositorFrameSink() override;
62 63
63 // This client must be set before BindToClient() happens. 64 // This client must be set before BindToClient() happens.
64 void SetClient(TestCompositorFrameSinkClient* client) { 65 void SetClient(TestCompositorFrameSinkClient* client) {
65 test_client_ = client; 66 test_client_ = client;
66 } 67 }
67 void SetEnlargePassTextureAmount(const gfx::Size& s) { 68 void SetEnlargePassTextureAmount(const gfx::Size& s) {
68 enlarge_pass_texture_amount_ = s; 69 enlarge_pass_texture_amount_ = s;
69 } 70 }
70 71
(...skipping 23 matching lines...) Expand all
94 void DisplayDidDrawAndSwap() override; 95 void DisplayDidDrawAndSwap() override;
95 96
96 private: 97 private:
97 // ExternalBeginFrameSource implementation. 98 // ExternalBeginFrameSource implementation.
98 void OnNeedsBeginFrames(bool needs_begin_frames) override; 99 void OnNeedsBeginFrames(bool needs_begin_frames) override;
99 void OnDidFinishFrame(const BeginFrameAck& ack) override; 100 void OnDidFinishFrame(const BeginFrameAck& ack) override;
100 101
101 void SendCompositorFrameAckToClient(); 102 void SendCompositorFrameAckToClient();
102 103
103 const bool synchronous_composite_; 104 const bool synchronous_composite_;
105 const bool disable_display_vsync_;
104 const RendererSettings renderer_settings_; 106 const RendererSettings renderer_settings_;
105 107
106 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 108 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
107 109
108 FrameSinkId frame_sink_id_; 110 FrameSinkId frame_sink_id_;
109 // TODO(danakj): These don't need to be stored in unique_ptrs when 111 // TODO(danakj): These don't need to be stored in unique_ptrs when
110 // CompositorFrameSink is owned/destroyed on the compositor thread. 112 // CompositorFrameSink is owned/destroyed on the compositor thread.
111 std::unique_ptr<SurfaceManager> surface_manager_; 113 std::unique_ptr<SurfaceManager> surface_manager_;
112 std::unique_ptr<LocalSurfaceIdAllocator> local_surface_id_allocator_; 114 std::unique_ptr<LocalSurfaceIdAllocator> local_surface_id_allocator_;
113 LocalSurfaceId delegated_local_surface_id_; 115 LocalSurfaceId delegated_local_surface_id_;
(...skipping 11 matching lines...) Expand all
125 gfx::Size enlarge_pass_texture_amount_; 127 gfx::Size enlarge_pass_texture_amount_;
126 128
127 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; 129 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_;
128 130
129 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; 131 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_;
130 }; 132 };
131 133
132 } // namespace cc 134 } // namespace cc
133 135
134 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ 136 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698