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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1885903002: Revert of Make lost context and error message callbacks on GpuControl go to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « mojo/gles2/command_buffer_client_impl.h ('k') | mojo/gles2/gles2_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/command_buffer_client_impl.cc
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc
index e32a2146cccd3469697c312ebd68360ff2e4256e..14f0569ce1495c1f9ae994a8fdec6660abf305d6 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -16,7 +16,6 @@
#include "components/mus/gles2/command_buffer_type_conversions.h"
#include "components/mus/gles2/mojo_buffer_backing.h"
#include "components/mus/gles2/mojo_gpu_memory_buffer.h"
-#include "gpu/command_buffer/client/gpu_control_client.h"
#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
#include "gpu/command_buffer/common/sync_token.h"
@@ -62,11 +61,15 @@
} // namespace
+CommandBufferDelegate::~CommandBufferDelegate() {}
+
+void CommandBufferDelegate::ContextLost() {}
+
CommandBufferClientImpl::CommandBufferClientImpl(
+ CommandBufferDelegate* delegate,
const std::vector<int32_t>& attribs,
mojo::ScopedMessagePipeHandle command_buffer_handle)
- : gpu_control_client_(nullptr),
- destroyed_(false),
+ : delegate_(delegate),
attribs_(attribs),
client_binding_(this),
command_buffer_id_(),
@@ -200,10 +203,6 @@
command_buffer_->DestroyTransferBuffer(id);
}
-void CommandBufferClientImpl::SetGpuControlClient(gpu::GpuControlClient* c) {
- gpu_control_client_ = c;
-}
-
gpu::Capabilities CommandBufferClientImpl::GetCapabilities() {
return capabilities_;
}
@@ -286,14 +285,10 @@
}
void CommandBufferClientImpl::Destroyed(int32_t lost_reason, int32_t error) {
- if (destroyed_)
- return;
last_state_.context_lost_reason =
static_cast<gpu::error::ContextLostReason>(lost_reason);
last_state_.error = static_cast<gpu::error::Error>(error);
- if (gpu_control_client_)
- gpu_control_client_->OnGpuControlLostContext();
- destroyed_ = true;
+ delegate_->ContextLost();
}
void CommandBufferClientImpl::SignalAck(uint32_t id) {
« no previous file with comments | « mojo/gles2/command_buffer_client_impl.h ('k') | mojo/gles2/gles2_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698