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

Unified Diff: cc/trees/layer_tree_host_perftest.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_perftest.cc
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index ff17af70317cffec220d884d005afc799428cb3c..073d9fb7cb4f42591a4bb7465cabaebfdf44506a 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -23,6 +23,7 @@
#include "cc/test/layer_tree_json_parser.h"
#include "cc/test/layer_tree_test.h"
#include "cc/test/paths.h"
+#include "cc/test/test_compositor_frame_sink.h"
#include "cc/trees/layer_tree_impl.h"
#include "testing/perf/perf_test.h"
@@ -45,12 +46,18 @@ class LayerTreeHostPerfTest : public LayerTreeTest {
measure_commit_cost_(false) {
}
- void InitializeSettings(LayerTreeSettings* settings) override {
- // LayerTreeTests give the Display's BeginFrameSource directly to the
- // LayerTreeHost like we do in the Browser process via
- // TestDelegatingOutputSurface, so setting disable_display_vsync here
- // unthrottles both the DisplayScheduler and the Scheduler.
- settings->renderer_settings.disable_display_vsync = true;
+ std::unique_ptr<TestCompositorFrameSink> CreateCompositorFrameSink(
+ scoped_refptr<ContextProvider> compositor_context_provider,
+ scoped_refptr<ContextProvider> worker_context_provider) override {
+ constexpr bool disable_display_vsync = true;
+ bool synchronous_composite =
+ !HasImplThread() &&
+ !layer_tree_host()->GetSettings().single_thread_proxy_scheduler;
+ return base::MakeUnique<TestCompositorFrameSink>(
+ compositor_context_provider, std::move(worker_context_provider),
+ shared_bitmap_manager(), gpu_memory_buffer_manager(),
+ layer_tree_host()->GetSettings().renderer_settings,
+ ImplThreadTaskRunner(), synchronous_composite, disable_display_vsync);
}
void BeginTest() override {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698