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

Unified Diff: components/viz/service/display_compositor/gpu_display_provider.cc

Issue 2942283002: viz: Use a simple GpuMemoryBufferManager implementation. (Closed)
Patch Set: . Created 3 years, 6 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
Index: components/viz/service/display_compositor/gpu_display_provider.cc
diff --git a/components/viz/service/display_compositor/gpu_display_provider.cc b/components/viz/service/display_compositor/gpu_display_provider.cc
index 8526c0101ef772507febf7d1dcce964b7e0ee52d..1721eb5d5180b8384e93c4ad4405b376ddfccbf3 100644
--- a/components/viz/service/display_compositor/gpu_display_provider.cc
+++ b/components/viz/service/display_compositor/gpu_display_provider.cc
@@ -17,8 +17,10 @@
#include "cc/surfaces/display_scheduler.h"
#include "components/viz/service/display_compositor/display_output_surface.h"
#include "components/viz/service/display_compositor/host_shared_bitmap_manager.h"
+#include "components/viz/service/display_compositor/in_process_gpu_memory_buffer_manager.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/command_buffer/service/image_factory.h"
+#include "gpu/ipc/service/gpu_channel_manager.h"
#if defined(USE_OZONE)
#include "components/viz/service/display_compositor/display_output_surface_ozone.h"
@@ -29,11 +31,13 @@ namespace viz {
GpuDisplayProvider::GpuDisplayProvider(
scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service,
- std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager,
- gpu::ImageFactory* image_factory)
+ gpu::GpuChannelManager* gpu_channel_manager)
: gpu_service_(std::move(gpu_service)),
- gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)),
- image_factory_(image_factory),
+ gpu_memory_buffer_manager_(
+ base::MakeUnique<InProcessGpuMemoryBufferManager>(
+ gpu_channel_manager)),
+ image_factory_(
+ gpu_channel_manager->gpu_memory_buffer_factory()->AsImageFactory()),
task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
GpuDisplayProvider::~GpuDisplayProvider() = default;

Powered by Google App Engine
This is Rietveld 408576698