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

Side by Side Diff: content/browser/compositor/browser_compositor_output_surface.cc

Issue 1939253002: Turn on enable begin frame scheduling by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/compositor/browser_compositor_output_surface.h" 5 #include "content/browser/compositor/browser_compositor_output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 13 matching lines...) Expand all
24 scoped_refptr<cc::ContextProvider> context_provider, 24 scoped_refptr<cc::ContextProvider> context_provider,
25 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, 25 scoped_refptr<ui::CompositorVSyncManager> vsync_manager,
26 cc::SyntheticBeginFrameSource* begin_frame_source, 26 cc::SyntheticBeginFrameSource* begin_frame_source,
27 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator> 27 std::unique_ptr<display_compositor::CompositorOverlayCandidateValidator>
28 overlay_candidate_validator) 28 overlay_candidate_validator)
29 : OutputSurface(std::move(context_provider), nullptr, nullptr), 29 : OutputSurface(std::move(context_provider), nullptr, nullptr),
30 vsync_manager_(std::move(vsync_manager)), 30 vsync_manager_(std::move(vsync_manager)),
31 synthetic_begin_frame_source_(begin_frame_source), 31 synthetic_begin_frame_source_(begin_frame_source),
32 reflector_(nullptr), 32 reflector_(nullptr),
33 use_begin_frame_scheduling_( 33 use_begin_frame_scheduling_(
34 base::CommandLine::ForCurrentProcess()->HasSwitch( 34 !base::CommandLine::ForCurrentProcess()->HasSwitch(
35 cc::switches::kEnableBeginFrameScheduling)) { 35 cc::switches::kDisableBeginFrameScheduling)) {
36 overlay_candidate_validator_ = std::move(overlay_candidate_validator); 36 overlay_candidate_validator_ = std::move(overlay_candidate_validator);
37 Initialize(); 37 Initialize();
38 } 38 }
39 39
40 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 40 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
41 std::unique_ptr<cc::SoftwareOutputDevice> software_device, 41 std::unique_ptr<cc::SoftwareOutputDevice> software_device,
42 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 42 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
43 cc::SyntheticBeginFrameSource* begin_frame_source) 43 cc::SyntheticBeginFrameSource* begin_frame_source)
44 : OutputSurface(nullptr, nullptr, std::move(software_device)), 44 : OutputSurface(nullptr, nullptr, std::move(software_device)),
45 vsync_manager_(vsync_manager), 45 vsync_manager_(vsync_manager),
46 synthetic_begin_frame_source_(begin_frame_source), 46 synthetic_begin_frame_source_(begin_frame_source),
47 reflector_(nullptr), 47 reflector_(nullptr),
48 use_begin_frame_scheduling_( 48 use_begin_frame_scheduling_(
49 base::CommandLine::ForCurrentProcess()->HasSwitch( 49 !base::CommandLine::ForCurrentProcess()->HasSwitch(
50 cc::switches::kEnableBeginFrameScheduling)) { 50 cc::switches::kDisableBeginFrameScheduling)) {
51 Initialize(); 51 Initialize();
52 } 52 }
53 53
54 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 54 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
55 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider, 55 const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
56 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 56 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
57 cc::SyntheticBeginFrameSource* begin_frame_source) 57 cc::SyntheticBeginFrameSource* begin_frame_source)
58 : OutputSurface(std::move(vulkan_context_provider)), 58 : OutputSurface(std::move(vulkan_context_provider)),
59 vsync_manager_(vsync_manager), 59 vsync_manager_(vsync_manager),
60 synthetic_begin_frame_source_(begin_frame_source), 60 synthetic_begin_frame_source_(begin_frame_source),
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { 138 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() {
139 return base::Closure(); 139 return base::Closure();
140 } 140 }
141 141
142 cc::OverlayCandidateValidator* 142 cc::OverlayCandidateValidator*
143 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { 143 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const {
144 return overlay_candidate_validator_.get(); 144 return overlay_candidate_validator_.get();
145 } 145 }
146 146
147 } // namespace content 147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698