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

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1686543004: mus: Modify mojo command buffer to match current chrome gpu ipc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: 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 cbf9b3ea08920c533ec7d7d73704f56c41a02e92..646c582c26c11116094441dd9237d5d1f4e98e56 100644
--- a/mojo/gles2/command_buffer_client_impl.cc
+++ b/mojo/gles2/command_buffer_client_impl.cc
@@ -84,7 +84,7 @@ CommandBufferClientImpl::CommandBufferClientImpl(
std::move(command_buffer_handle), 0u),
async_waiter);
command_buffer_.set_connection_error_handler(
- [this]() { DidLoseContext(gpu::error::kUnknown); });
+ [this]() { Destroyed(gpu::error::kUnknown, gpu::error::kLostContext); });
}
CommandBufferClientImpl::~CommandBufferClientImpl() {}
@@ -102,7 +102,7 @@ bool CommandBufferClientImpl::Initialize() {
shared_state()->Initialize();
- mus::mojom::CommandBufferLostContextObserverPtr observer_ptr;
+ mus::mojom::CommandBufferObserverPtr observer_ptr;
observer_binding_.Bind(GetProxy(&observer_ptr), async_waiter_);
mus::mojom::CommandBufferInitializeResultPtr initialize_result;
@@ -285,13 +285,27 @@ void CommandBufferClientImpl::SignalQuery(uint32_t query,
NOTIMPLEMENTED();
}
-void CommandBufferClientImpl::DidLoseContext(int32_t lost_reason) {
- last_state_.error = gpu::error::kLostContext;
+void CommandBufferClientImpl::Destroyed(int32_t lost_reason, int32_t error) {
last_state_.context_lost_reason =
static_cast<gpu::error::ContextLostReason>(lost_reason);
+ last_state_.error = static_cast<gpu::error::Error>(error);
delegate_->ContextLost();
}
+void CommandBufferClientImpl::SignalAck(uint32_t id) {
+}
+
+void CommandBufferClientImpl::SwapBuffersCompleted(int32_t result) {
+}
+
+void CommandBufferClientImpl::UpdateState(
+ const gpu::CommandBuffer::State& state) {
+}
+
+void CommandBufferClientImpl::UpdateVSyncParameters(int64_t timebase,
+ int64_t interval) {
+}
+
void CommandBufferClientImpl::TryUpdateState() {
if (last_state_.error == gpu::error::kNoError)
shared_state()->Read(&last_state_);
@@ -307,7 +321,7 @@ void CommandBufferClientImpl::MakeProgressAndUpdateState() {
if (!command_buffer_.WaitForIncomingResponse()) {
VLOG(1) << "Channel encountered error while waiting for command buffer.";
// TODO(piman): is it ok for this to re-enter?
- DidLoseContext(gpu::error::kUnknown);
+ Destroyed(gpu::error::kUnknown, gpu::error::kLostContext);
return;
}

Powered by Google App Engine
This is Rietveld 408576698