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

Side by Side Diff: content/browser/renderer_host/context_provider_factory_impl_android.cc

Issue 2684933003: Move frame_sink_id management to framesink_manager.cc/h from (Closed)
Patch Set: Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/renderer_host/context_provider_factory_impl_android.h" 5 #include "content/browser/renderer_host/context_provider_factory_impl_android.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 shared_context_provider, std::move(gpu_channel_host)); 128 shared_context_provider, std::move(gpu_channel_host));
129 } 129 }
130 130
131 cc::SurfaceManager* ContextProviderFactoryImpl::GetSurfaceManager() { 131 cc::SurfaceManager* ContextProviderFactoryImpl::GetSurfaceManager() {
132 if (!surface_manager_) 132 if (!surface_manager_)
133 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); 133 surface_manager_ = base::WrapUnique(new cc::SurfaceManager);
134 134
135 return surface_manager_.get(); 135 return surface_manager_.get();
136 } 136 }
137 137
138 cc::FrameSinkManager* ContextProviderFactoryImpl::GetFrameSinkManager() {
139 if (!framesink_manager_)
140 framesink_manager_ = base::WrapUnique(new cc::FrameSinkManager);
141
142 return framesink_manager_.get();
143 }
144
138 cc::FrameSinkId ContextProviderFactoryImpl::AllocateFrameSinkId() { 145 cc::FrameSinkId ContextProviderFactoryImpl::AllocateFrameSinkId() {
139 // The FrameSinkId generated here must be unique with 146 // The FrameSinkId generated here must be unique with
140 // RenderWidgetHostViewAndroid's 147 // RenderWidgetHostViewAndroid's
141 // FrameSinkId allocation. 148 // FrameSinkId allocation.
142 // TODO(crbug.com/685777): Centralize allocation in one place for easier 149 // TODO(crbug.com/685777): Centralize allocation in one place for easier
143 // maintenance. 150 // maintenance.
144 return cc::FrameSinkId(0 /* client_id */, next_sink_id_++); 151 return cc::FrameSinkId(0 /* client_id */, next_sink_id_++);
145 } 152 }
146 153
147 gpu::GpuMemoryBufferManager* 154 gpu::GpuMemoryBufferManager*
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 nullptr, 245 nullptr,
239 GpuChannelHostResult::FAILURE_GPU_PROCESS_INITIALIZATION_FAILED); 246 GpuChannelHostResult::FAILURE_GPU_PROCESS_INITIALIZATION_FAILED);
240 } 247 }
241 } 248 }
242 249
243 void ContextProviderFactoryImpl::OnGpuChannelTimeout() { 250 void ContextProviderFactoryImpl::OnGpuChannelTimeout() {
244 LOG(FATAL) << "Timed out waiting for GPU channel."; 251 LOG(FATAL) << "Timed out waiting for GPU channel.";
245 } 252 }
246 253
247 } // namespace content 254 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698