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

Unified Diff: cc/trees/layer_tree_host_perftest.cc

Issue 2854953006: Move disable_display_vsync out of RendererSettings (Closed)
Patch Set: Fix LayoutTestSupport Created 3 years, 8 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
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..fa9450853a90185dec1ad37ce1095efed11f4ae3 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,22 @@ 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;
+ // LayerTreeTests give the Display's BeginFrameSource directly to the
danakj 2017/05/04 15:36:35 I don't think this comment makes sense anymore, no
Alex Z. 2017/05/04 18:41:55 Done.
+ // LayerTreeHost like we do in the Browser process via
+ // TestDelegatingOutputSurface, so setting disable_display_vsync here
+ // unthrottles both the DisplayScheduler and the Scheduler.
+ 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 {

Powered by Google App Engine
This is Rietveld 408576698