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

Side by Side Diff: content/test/layouttest_support.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 bool synchronous_composite = !task_runner; 339 bool synchronous_composite = !task_runner;
340 if (!task_runner) 340 if (!task_runner)
341 task_runner = base::ThreadTaskRunnerHandle::Get().get(); 341 task_runner = base::ThreadTaskRunnerHandle::Get().get();
342 342
343 ScreenInfo dummy_screen_info; 343 ScreenInfo dummy_screen_info;
344 cc::LayerTreeSettings settings = 344 cc::LayerTreeSettings settings =
345 RenderWidgetCompositor::GenerateLayerTreeSettings( 345 RenderWidgetCompositor::GenerateLayerTreeSettings(
346 *base::CommandLine::ForCurrentProcess(), deps, 1.f, false, 346 *base::CommandLine::ForCurrentProcess(), deps, 1.f, false,
347 dummy_screen_info); 347 dummy_screen_info);
348 348
349 constexpr bool disable_display_vsync = false;
349 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>( 350 auto compositor_frame_sink = base::MakeUnique<cc::TestCompositorFrameSink>(
350 std::move(compositor_context_provider), 351 std::move(compositor_context_provider),
351 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */, 352 std::move(worker_context_provider), nullptr /* shared_bitmap_manager */,
352 gpu_memory_buffer_manager, settings.renderer_settings, task_runner, 353 gpu_memory_buffer_manager, settings.renderer_settings, task_runner,
353 synchronous_composite); 354 synchronous_composite, disable_display_vsync);
354 compositor_frame_sink->SetClient(this); 355 compositor_frame_sink->SetClient(this);
355 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get(); 356 compositor_frame_sinks_[routing_id] = compositor_frame_sink.get();
356 return std::move(compositor_frame_sink); 357 return std::move(compositor_frame_sink);
357 } 358 }
358 359
359 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( 360 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput(
360 int32_t routing_id, 361 int32_t routing_id,
361 std::unique_ptr<cc::CopyOutputRequest> request) override { 362 std::unique_ptr<cc::CopyOutputRequest> request) override {
362 // Note that we can't immediately check compositor_frame_sinks_, since it 363 // Note that we can't immediately check compositor_frame_sinks_, since it
363 // may not have been created yet. Instead, we wait until OnCommit to find 364 // may not have been created yet. Instead, we wait until OnCommit to find
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 598 }
598 } 599 }
599 600
600 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { 601 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) {
601 RequestExtraData* extra_data = 602 RequestExtraData* extra_data =
602 static_cast<RequestExtraData*>(request.GetExtraData()); 603 static_cast<RequestExtraData*>(request.GetExtraData());
603 return extra_data && extra_data->navigation_initiated_by_renderer(); 604 return extra_data && extra_data->navigation_initiated_by_renderer();
604 } 605 }
605 606
606 } // namespace content 607 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698