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

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

Issue 1230203007: Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "cc/base/switches.h" 11 #include "cc/base/switches.h"
12 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 12 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h"
13 #include "content/browser/compositor/reflector_impl.h" 13 #include "content/browser/compositor/reflector_impl.h"
14 #include "content/common/gpu/client/context_provider_command_buffer.h" 14 #include "content/common/gpu/client/context_provider_command_buffer.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 18 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
19 const scoped_refptr<cc::ContextProvider>& context_provider, 19 const scoped_refptr<cc::ContextProvider>& context_provider,
20 const scoped_refptr<cc::ContextProvider>& worker_context_provider,
20 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 21 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
21 scoped_ptr<BrowserCompositorOverlayCandidateValidator> 22 scoped_ptr<BrowserCompositorOverlayCandidateValidator>
22 overlay_candidate_validator) 23 overlay_candidate_validator)
23 : OutputSurface(context_provider), 24 : OutputSurface(context_provider, worker_context_provider),
24 vsync_manager_(vsync_manager), 25 vsync_manager_(vsync_manager),
25 reflector_(nullptr), 26 reflector_(nullptr),
26 use_begin_frame_scheduling_(base::CommandLine::ForCurrentProcess()-> 27 use_begin_frame_scheduling_(
27 HasSwitch(cc::switches::kEnableBeginFrameScheduling)) { 28 base::CommandLine::ForCurrentProcess()
29 ->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
28 overlay_candidate_validator_ = overlay_candidate_validator.Pass(); 30 overlay_candidate_validator_ = overlay_candidate_validator.Pass();
29 Initialize(); 31 Initialize();
30 } 32 }
31 33
32 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 34 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
33 scoped_ptr<cc::SoftwareOutputDevice> software_device, 35 scoped_ptr<cc::SoftwareOutputDevice> software_device,
34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) 36 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager)
35 : OutputSurface(software_device.Pass()), 37 : OutputSurface(software_device.Pass()),
36 vsync_manager_(vsync_manager), 38 vsync_manager_(vsync_manager),
37 reflector_(nullptr), 39 reflector_(nullptr),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { 109 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() {
108 return base::Closure(); 110 return base::Closure();
109 } 111 }
110 112
111 cc::OverlayCandidateValidator* 113 cc::OverlayCandidateValidator*
112 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { 114 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const {
113 return overlay_candidate_validator_.get(); 115 return overlay_candidate_validator_.get();
114 } 116 }
115 117
116 } // namespace content 118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698