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

Unified Diff: mojo/services/gles2/gpu_impl.cc

Issue 734273002: Cleanse mojo/services/gles2 of InterfaceImpl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar interface request Created 6 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
« no previous file with comments | « mojo/services/gles2/gpu_impl.h ('k') | mojo/services/native_viewport/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/gles2/gpu_impl.cc
diff --git a/mojo/services/gles2/gpu_impl.cc b/mojo/services/gles2/gpu_impl.cc
index f6df3d0b79b9e9770aa5939a8575750812da6194..5cb89a79bd70ec6cfc2aaf4302bf27dfddfdb39e 100644
--- a/mojo/services/gles2/gpu_impl.cc
+++ b/mojo/services/gles2/gpu_impl.cc
@@ -12,9 +12,12 @@
namespace mojo {
GpuImpl::GpuImpl(
+ InterfaceRequest<Gpu> request,
const scoped_refptr<gfx::GLShareGroup>& share_group,
const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager)
- : share_group_(share_group), mailbox_manager_(mailbox_manager) {
+ : share_group_(share_group),
+ mailbox_manager_(mailbox_manager),
+ binding_(this, request.Pass()) {
}
GpuImpl::~GpuImpl() {
@@ -23,21 +26,17 @@ GpuImpl::~GpuImpl() {
void GpuImpl::CreateOnscreenGLES2Context(
uint64_t native_viewport_id,
SizePtr size,
- InterfaceRequest<CommandBuffer> command_buffer_request) {
+ InterfaceRequest<CommandBuffer> request) {
gfx::AcceleratedWidget widget = bit_cast<gfx::AcceleratedWidget>(
static_cast<uintptr_t>(native_viewport_id));
- BindToRequest(new CommandBufferImpl(widget,
- size.To<gfx::Size>(),
- share_group_.get(),
- mailbox_manager_.get()),
- &command_buffer_request);
+ new CommandBufferImpl(request.Pass(), widget, size.To<gfx::Size>(),
+ share_group_.get(), mailbox_manager_.get());
}
void GpuImpl::CreateOffscreenGLES2Context(
- InterfaceRequest<CommandBuffer> command_buffer_request) {
- BindToRequest(
- new CommandBufferImpl(share_group_.get(), mailbox_manager_.get()),
- &command_buffer_request);
+ InterfaceRequest<CommandBuffer> request) {
+ new CommandBufferImpl(request.Pass(), share_group_.get(),
+ mailbox_manager_.get());
}
} // namespace mojo
« no previous file with comments | « mojo/services/gles2/gpu_impl.h ('k') | mojo/services/native_viewport/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698