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

Unified Diff: components/mus/gpu/gpu_service_mus.cc

Issue 2049083002: Implement MusGpuMemoryBufferManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the mojom document Created 4 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
« no previous file with comments | « components/mus/gpu/gpu_service_mus.h ('k') | components/mus/gpu/mus_gpu_memory_buffer_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/gpu/gpu_service_mus.cc
diff --git a/components/mus/gpu/gpu_service_mus.cc b/components/mus/gpu/gpu_service_mus.cc
index 51f23270d639898330ddd59d34994de2652e346d..91eb1aed298d3077d8ce1962af272034ecb74276 100644
--- a/components/mus/gpu/gpu_service_mus.cc
+++ b/components/mus/gpu/gpu_service_mus.cc
@@ -8,7 +8,8 @@
#include "base/memory/singleton.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "components/mus/common/mojo_gpu_memory_buffer_manager.h"
+#include "build/build_config.h"
+#include "components/mus/gpu/mus_gpu_memory_buffer_manager.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/config/gpu_info_collector.h"
@@ -29,6 +30,10 @@
#include "ui/gl/init/gl_factory.h"
#include "url/gurl.h"
+#if defined(USE_OZONE)
+#include "ui/ozone/public/ozone_platform.h"
+#endif
+
namespace mus {
namespace {
@@ -184,7 +189,8 @@ void GpuServiceMus::Initialize() {
base::Unretained(this), &channel_handle, &event));
event.Wait();
- gpu_memory_buffer_manager_local_.reset(new MojoGpuMemoryBufferManager);
+ gpu_memory_buffer_manager_local_.reset(
+ new MusGpuMemoryBufferManager(this, kLocalGpuChannelClientId));
gpu_channel_local_ = gpu::GpuChannelHost::Create(
this, kLocalGpuChannelClientId, gpu_info_, channel_handle,
&shutdown_event_, gpu_memory_buffer_manager_local_.get());
@@ -199,6 +205,10 @@ void GpuServiceMus::InitializeOnGpuThread(IPC::ChannelHandle* channel_handle,
gpu_info_.jpeg_decode_accelerator_supported =
media::GpuJpegDecodeAccelerator::IsSupported();
+#if defined(USE_OZONE)
+ ui::OzonePlatform::InitializeForGPU();
+#endif
+
if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) {
gpu_memory_buffer_factory_ =
gpu::GpuMemoryBufferFactory::CreateNativeType();
« no previous file with comments | « components/mus/gpu/gpu_service_mus.h ('k') | components/mus/gpu/mus_gpu_memory_buffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698