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

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

Issue 734273002: Cleanse mojo/services/gles2 of InterfaceImpl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
Index: mojo/services/gles2/command_buffer_impl.cc
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc
index cd805e4dc34b35b69aff4b6b9e115a411ea78e3a..5acd6feb1a16e519ea971e02678f508963f11a41 100644
--- a/mojo/services/gles2/command_buffer_impl.cc
+++ b/mojo/services/gles2/command_buffer_impl.cc
@@ -44,15 +44,18 @@ class MemoryTrackerStub : public gpu::gles2::MemoryTracker {
} // anonymous namespace
CommandBufferImpl::CommandBufferImpl(
+ ScopedMessagePipeHandle handle,
gfx::GLShareGroup* share_group,
gpu::gles2::MailboxManager* mailbox_manager)
: widget_(gfx::kNullAcceleratedWidget),
size_(1, 1),
share_group_(share_group),
- mailbox_manager_(mailbox_manager) {
+ mailbox_manager_(mailbox_manager),
+ binding_(this, handle.Pass()) {
}
CommandBufferImpl::CommandBufferImpl(
+ ScopedMessagePipeHandle handle,
gfx::AcceleratedWidget widget,
const gfx::Size& size,
gfx::GLShareGroup* share_group,
@@ -60,11 +63,12 @@ CommandBufferImpl::CommandBufferImpl(
: widget_(widget),
jamesr 2014/11/18 05:24:20 aside: this should use delegated c'tors now that t
size_(size),
share_group_(share_group),
- mailbox_manager_(mailbox_manager) {
+ mailbox_manager_(mailbox_manager),
+ binding_(this, handle.Pass()) {
}
CommandBufferImpl::~CommandBufferImpl() {
- client()->DidDestroy();
+ binding_.client()->DidDestroy();
if (decoder_) {
bool have_context = decoder_->MakeCurrent();
decoder_->Destroy(have_context);
@@ -159,7 +163,7 @@ void CommandBufferImpl::SetGetBuffer(int32_t buffer) {
void CommandBufferImpl::Flush(int32_t put_offset) {
if (!context_->MakeCurrent(surface_.get())) {
DLOG(WARNING) << "Context lost";
- client()->LostContext(gpu::error::kUnknown);
+ binding_.client()->LostContext(gpu::error::kUnknown);
return;
}
command_buffer_->Flush(put_offset);
@@ -196,7 +200,7 @@ void CommandBufferImpl::Echo(const Callback<void()>& callback) {
void CommandBufferImpl::OnParseError() {
gpu::CommandBuffer::State state = command_buffer_->GetLastState();
- client()->LostContext(state.context_lost_reason);
+ binding_.client()->LostContext(state.context_lost_reason);
}
void CommandBufferImpl::OnResize(gfx::Size size, float scale_factor) {

Powered by Google App Engine
This is Rietveld 408576698