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

Unified Diff: services/gles2/command_buffer_driver.cc

Issue 868203003: De-Client CommandBuffer interface (Closed) Base URL: git@github.com:domokit/mojo.git@fix_sample_app
Patch Set: Created 5 years, 11 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 | « services/gles2/command_buffer_driver.h ('k') | services/gles2/command_buffer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gles2/command_buffer_driver.cc
diff --git a/services/gles2/command_buffer_driver.cc b/services/gles2/command_buffer_driver.cc
index 5d159b4471e33ea54515e9cfc1d8a363e04ce04e..98b85780de92d3314d364c4d8539aee8a59c3444 100644
--- a/services/gles2/command_buffer_driver.cc
+++ b/services/gles2/command_buffer_driver.cc
@@ -81,13 +81,14 @@ CommandBufferDriver::~CommandBufferDriver() {
bool have_context = decoder_->MakeCurrent();
decoder_->Destroy(have_context);
}
- client_->DidDestroy();
}
void CommandBufferDriver::Initialize(
mojo::CommandBufferSyncClientPtr sync_client,
+ mojo::CommandBufferLostContextObserverPtr loss_observer,
mojo::ScopedSharedBufferHandle shared_state) {
sync_client_ = sync_client.Pass();
+ loss_observer_ = loss_observer.Pass();
bool success = DoInitialize(shared_state.Pass());
mojo::GpuCapabilitiesPtr capabilities =
success ? mojo::GpuCapabilities::From(decoder_->GetCapabilities())
@@ -238,7 +239,8 @@ void CommandBufferDriver::OnSyncPointRetired() {
}
void CommandBufferDriver::OnContextLost(uint32_t reason) {
- client_->LostContext(reason);
+ loss_observer_->DidLoseContext(reason);
+ client_->DidLoseContext();
}
void CommandBufferDriver::OnUpdateVSyncParameters(
« no previous file with comments | « services/gles2/command_buffer_driver.h ('k') | services/gles2/command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698