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

Unified Diff: services/gfx/compositor/backend/gpu_rasterizer.cc

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: delay InterfacePtr::Create() until you actually need an InterfacePtr. GetProxy() and ConnectToAppl… Created 4 years, 10 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: services/gfx/compositor/backend/gpu_rasterizer.cc
diff --git a/services/gfx/compositor/backend/gpu_rasterizer.cc b/services/gfx/compositor/backend/gpu_rasterizer.cc
index bdd6aa35ddced4f2c24764a5ca7195d5363b90e6..9f5cf0dba38eae9d3234e50be5c731f80f81e1e5 100644
--- a/services/gfx/compositor/backend/gpu_rasterizer.cc
+++ b/services/gfx/compositor/backend/gpu_rasterizer.cc
@@ -12,6 +12,7 @@
#include <GLES2/gl2extmojo.h>
#include <MGL/mgl.h>
#include <MGL/mgl_onscreen.h>
+#include <utility>
#include "base/bind.h"
#include "base/location.h"
@@ -50,7 +51,8 @@ void GpuRasterizer::CreateContext() {
base::Bind(&GpuRasterizer::InitContext, base::Unretained(this)));
}
-void GpuRasterizer::InitContext(mojo::CommandBufferPtr command_buffer) {
+void GpuRasterizer::InitContext(
+ mojo::InterfaceHandle<mojo::CommandBuffer> command_buffer) {
DCHECK(!gl_context_);
DCHECK(!ganesh_context_);
DCHECK(!ganesh_surface_);
@@ -61,7 +63,8 @@ void GpuRasterizer::InitContext(mojo::CommandBufferPtr command_buffer) {
return;
}
- gl_context_ = mojo::GLContext::CreateFromCommandBuffer(command_buffer.Pass());
+ gl_context_ = mojo::GLContext::CreateFromCommandBuffer(
+ mojo::CommandBufferPtr::Create(std::move(command_buffer)));
gl_context_->AddObserver(this);
ganesh_context_.reset(new mojo::skia::GaneshContext(gl_context_));

Powered by Google App Engine
This is Rietveld 408576698