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

Unified Diff: services/ui/ws/gpu_service_proxy.cc

Issue 2481263002: Introduce Display Compositor mojo interface. Use InProcessContextProvider. (Closed)
Patch Set: Make ContextProvider NON_EXPORTED_BASE of InProcessContextProvider Created 4 years, 1 month 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: services/ui/ws/gpu_service_proxy.cc
diff --git a/services/ui/ws/gpu_service_proxy.cc b/services/ui/ws/gpu_service_proxy.cc
index 64441648ff8fd8728849e5bdd3c149dac1871c90..2de1df2b3d6c4c64cc9938576869e7454693f6a8 100644
--- a/services/ui/ws/gpu_service_proxy.cc
+++ b/services/ui/ws/gpu_service_proxy.cc
@@ -14,7 +14,6 @@
#include "mojo/public/cpp/system/platform_handle.h"
#include "services/service_manager/public/cpp/connection.h"
#include "services/ui/ws/gpu_service_proxy_delegate.h"
-#include "services/ui/ws/mus_gpu_memory_buffer_manager.h"
#include "ui/gfx/buffer_format_util.h"
namespace ui {
@@ -22,8 +21,8 @@ namespace ws {
namespace {
-const int32_t kInternalGpuChannelClientId = 1;
-const uint64_t kInternalGpuChannelClientTracingId = 1;
+// The client Id 1 is reserved for the display compositor.
+const int32_t kInternalGpuChannelClientId = 2;
} // namespace
@@ -50,31 +49,22 @@ void GpuServiceProxy::Add(mojom::GpuServiceRequest request) {
bindings_.AddBinding(this, std::move(request));
}
+void GpuServiceProxy::CreateDisplayCompositor(
+ cc::mojom::DisplayCompositorRequest request,
+ cc::mojom::DisplayCompositorClientPtr client) {
+ gpu_service_->CreateDisplayCompositor(std::move(request), std::move(client));
+}
+
void GpuServiceProxy::OnInitialized(const gpu::GPUInfo& gpu_info) {
gpu_info_ = gpu_info;
- constexpr bool is_gpu_host = true;
- gpu_service_->EstablishGpuChannel(
- kInternalGpuChannelClientId, kInternalGpuChannelClientTracingId,
- is_gpu_host, base::Bind(&GpuServiceProxy::OnInternalGpuChannelEstablished,
- base::Unretained(this)));
-}
-
-void GpuServiceProxy::OnInternalGpuChannelEstablished(
- mojo::ScopedMessagePipeHandle channel_handle) {
+ // TODO(fsamuel): What is this thread used for?
sadrul 2016/11/21 17:23:49 See comment in .h
Fady Samuel 2016/11/21 20:40:41 Deleted.
io_thread_ = base::MakeUnique<base::Thread>("GPUIOThread");
base::Thread::Options thread_options(base::MessageLoop::TYPE_IO, 0);
thread_options.priority = base::ThreadPriority::NORMAL;
CHECK(io_thread_->StartWithOptions(thread_options));
- gpu_memory_buffer_manager_ = base::MakeUnique<MusGpuMemoryBufferManager>(
- gpu_service_.get(), kInternalGpuChannelClientId);
- gpu_channel_ = gpu::GpuChannelHost::Create(
- this, kInternalGpuChannelClientId, gpu_info_,
- IPC::ChannelHandle(channel_handle.release()), &shutdown_event_,
- gpu_memory_buffer_manager_.get());
- if (delegate_)
- delegate_->OnGpuChannelEstablished(gpu_channel_);
+ delegate_->OnGpuServiceInitialized();
}
void GpuServiceProxy::OnGpuChannelEstablished(

Powered by Google App Engine
This is Rietveld 408576698