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

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

Issue 1336703002: Revert of Re-land: cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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,
21 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 20 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
22 scoped_ptr<BrowserCompositorOverlayCandidateValidator> 21 scoped_ptr<BrowserCompositorOverlayCandidateValidator>
23 overlay_candidate_validator) 22 overlay_candidate_validator)
24 : OutputSurface(context_provider, worker_context_provider), 23 : OutputSurface(context_provider),
25 vsync_manager_(vsync_manager), 24 vsync_manager_(vsync_manager),
26 reflector_(nullptr), 25 reflector_(nullptr),
27 use_begin_frame_scheduling_( 26 use_begin_frame_scheduling_(base::CommandLine::ForCurrentProcess()->
28 base::CommandLine::ForCurrentProcess() 27 HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
29 ->HasSwitch(cc::switches::kEnableBeginFrameScheduling)) {
30 overlay_candidate_validator_ = overlay_candidate_validator.Pass(); 28 overlay_candidate_validator_ = overlay_candidate_validator.Pass();
31 Initialize(); 29 Initialize();
32 } 30 }
33 31
34 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface( 32 BrowserCompositorOutputSurface::BrowserCompositorOutputSurface(
35 scoped_ptr<cc::SoftwareOutputDevice> software_device, 33 scoped_ptr<cc::SoftwareOutputDevice> software_device,
36 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) 34 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager)
37 : OutputSurface(software_device.Pass()), 35 : OutputSurface(software_device.Pass()),
38 vsync_manager_(vsync_manager), 36 vsync_manager_(vsync_manager),
39 reflector_(nullptr), 37 reflector_(nullptr),
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() { 107 BrowserCompositorOutputSurface::CreateCompositionStartedCallback() {
110 return base::Closure(); 108 return base::Closure();
111 } 109 }
112 110
113 cc::OverlayCandidateValidator* 111 cc::OverlayCandidateValidator*
114 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const { 112 BrowserCompositorOutputSurface::GetOverlayCandidateValidator() const {
115 return overlay_candidate_validator_.get(); 113 return overlay_candidate_validator_.get();
116 } 114 }
117 115
118 } // namespace content 116 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698