OLD | NEW |
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/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if (!surface_manager_) | 131 if (!surface_manager_) |
132 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); | 132 surface_manager_ = base::WrapUnique(new cc::SurfaceManager); |
133 | 133 |
134 return surface_manager_.get(); | 134 return surface_manager_.get(); |
135 } | 135 } |
136 | 136 |
137 cc::FrameSinkId ContextProviderFactoryImpl::AllocateFrameSinkId() { | 137 cc::FrameSinkId ContextProviderFactoryImpl::AllocateFrameSinkId() { |
138 return cc::FrameSinkId(++next_client_id_, 0 /* sink_id */); | 138 return cc::FrameSinkId(++next_client_id_, 0 /* sink_id */); |
139 } | 139 } |
140 | 140 |
141 cc::SharedBitmapManager* ContextProviderFactoryImpl::GetSharedBitmapManager() { | |
142 return HostSharedBitmapManager::current(); | |
143 } | |
144 | |
145 gpu::GpuMemoryBufferManager* | 141 gpu::GpuMemoryBufferManager* |
146 ContextProviderFactoryImpl::GetGpuMemoryBufferManager() { | 142 ContextProviderFactoryImpl::GetGpuMemoryBufferManager() { |
147 return BrowserGpuMemoryBufferManager::current(); | 143 return BrowserGpuMemoryBufferManager::current(); |
148 } | 144 } |
149 | 145 |
150 scoped_refptr<cc::ContextProvider> | 146 scoped_refptr<cc::ContextProvider> |
151 ContextProviderFactoryImpl::CreateContextProviderInternal( | 147 ContextProviderFactoryImpl::CreateContextProviderInternal( |
152 command_buffer_metrics::ContextType context_type, | 148 command_buffer_metrics::ContextType context_type, |
153 gpu::SurfaceHandle surface_handle, | 149 gpu::SurfaceHandle surface_handle, |
154 gpu::SharedMemoryLimits shared_memory_limits, | 150 gpu::SharedMemoryLimits shared_memory_limits, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 nullptr, | 229 nullptr, |
234 GpuChannelHostResult::FAILURE_GPU_PROCESS_INITIALIZATION_FAILED); | 230 GpuChannelHostResult::FAILURE_GPU_PROCESS_INITIALIZATION_FAILED); |
235 } | 231 } |
236 } | 232 } |
237 | 233 |
238 void ContextProviderFactoryImpl::OnGpuChannelTimeout() { | 234 void ContextProviderFactoryImpl::OnGpuChannelTimeout() { |
239 LOG(FATAL) << "Timed out waiting for GPU channel."; | 235 LOG(FATAL) << "Timed out waiting for GPU channel."; |
240 } | 236 } |
241 | 237 |
242 } // namespace content | 238 } // namespace content |
OLD | NEW |