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

Unified Diff: services/ui/gpu/gpu_main.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 | « gpu/ipc/service/gpu_memory_buffer_factory.cc ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_main.cc
diff --git a/services/ui/gpu/gpu_main.cc b/services/ui/gpu/gpu_main.cc
index be286d89a1b04df2119400723241a3d3a58d3ce4..c10193a6b530c184d5d554ad16491d8f013deaf2 100644
--- a/services/ui/gpu/gpu_main.cc
+++ b/services/ui/gpu/gpu_main.cc
@@ -156,14 +156,8 @@ void GpuMain::InitOnGpuThread(
if (!success)
return;
- if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) {
- gpu_memory_buffer_factory_ =
- gpu::GpuMemoryBufferFactory::CreateNativeType();
- }
-
gpu_service_ = base::MakeUnique<GpuService>(
- gpu_init_->gpu_info(), gpu_init_->TakeWatchdogThread(),
- gpu_memory_buffer_factory_.get(), io_runner,
+ gpu_init_->gpu_info(), gpu_init_->TakeWatchdogThread(), io_runner,
gpu_init_->gpu_feature_info());
}
@@ -175,11 +169,7 @@ void GpuMain::CreateDisplayCompositorInternal(
gpu_thread_task_runner_, gpu_service_->sync_point_manager(),
gpu_service_->mailbox_manager(), gpu_service_->share_group());
- // |gpu_memory_buffer_factory_| is null in tests.
- gpu::ImageFactory* image_factory =
- gpu_memory_buffer_factory_ ? gpu_memory_buffer_factory_->AsImageFactory()
- : nullptr;
-
+ gpu::ImageFactory* image_factory = gpu_service_->gpu_image_factory();
mojom::GpuServicePtr gpu_service;
mojom::GpuServiceRequest gpu_service_request(&gpu_service);
« no previous file with comments | « gpu/ipc/service/gpu_memory_buffer_factory.cc ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698