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

Unified Diff: services/ui/gpu/gpu_service.cc

Issue 2781293003: gpu: Have GpuService create and own GpuMemoryBufferFactory. (Closed)
Patch Set: tot merge. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | services/ui/ws/gpu_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_service.cc
diff --git a/services/ui/gpu/gpu_service.cc b/services/ui/gpu/gpu_service.cc
index a209a2c7eab74466950ad0c9efd42e4583db7c6e..6daf6c207927e1d9804c1a31665f197e582e26fd 100644
--- a/services/ui/gpu/gpu_service.cc
+++ b/services/ui/gpu/gpu_service.cc
@@ -85,13 +85,13 @@ void DestroyBinding(
GpuService::GpuService(const gpu::GPUInfo& gpu_info,
std::unique_ptr<gpu::GpuWatchdogThread> watchdog_thread,
- gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory,
scoped_refptr<base::SingleThreadTaskRunner> io_runner,
const gpu::GpuFeatureInfo& gpu_feature_info)
: main_runner_(base::ThreadTaskRunnerHandle::Get()),
io_runner_(std::move(io_runner)),
watchdog_thread_(std::move(watchdog_thread)),
- gpu_memory_buffer_factory_(gpu_memory_buffer_factory),
+ gpu_memory_buffer_factory_(
+ gpu::GpuMemoryBufferFactory::CreateNativeType()),
gpu_info_(gpu_info),
gpu_feature_info_(gpu_feature_info),
sync_point_manager_(nullptr),
@@ -174,7 +174,7 @@ void GpuService::InitializeWithHost(mojom::GpuHostPtr gpu_host,
gpu_channel_manager_.reset(new gpu::GpuChannelManager(
gpu_preferences_, this, watchdog_thread_.get(),
base::ThreadTaskRunnerHandle::Get(), io_runner_, sync_point_manager_,
- gpu_memory_buffer_factory_, gpu_feature_info_,
+ gpu_memory_buffer_factory_.get(), gpu_feature_info_,
std::move(activity_flags)));
media_gpu_channel_manager_.reset(
@@ -194,6 +194,12 @@ void GpuService::Bind(mojom::GpuServiceRequest request) {
bindings_->AddBinding(this, std::move(request));
}
+gpu::ImageFactory* GpuService::gpu_image_factory() {
+ return gpu_memory_buffer_factory_
+ ? gpu_memory_buffer_factory_->AsImageFactory()
+ : nullptr;
+}
+
void GpuService::RecordLogMessage(int severity,
size_t message_start,
const std::string& str) {
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | services/ui/ws/gpu_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698