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

Unified Diff: mojo/gles2/gles2_context.cc

Issue 1864723003: 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: errorcallback: blimp2 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
Index: mojo/gles2/gles2_context.cc
diff --git a/mojo/gles2/gles2_context.cc b/mojo/gles2/gles2_context.cc
index 90ba14e8c957a8d4d5edce7ca41098126a1d0f92..dad5f0c92d38f6fe1114820832d47d39b1d7e073 100644
--- a/mojo/gles2/gles2_context.cc
+++ b/mojo/gles2/gles2_context.cc
@@ -28,13 +28,14 @@ GLES2Context::GLES2Context(const std::vector<int32_t>& attribs,
mojo::ScopedMessagePipeHandle command_buffer_handle,
MojoGLES2ContextLost lost_callback,
void* closure)
- : command_buffer_(this, attribs, std::move(command_buffer_handle)),
+ : command_buffer_(attribs, std::move(command_buffer_handle)),
lost_callback_(lost_callback),
closure_(closure) {}
GLES2Context::~GLES2Context() {}
bool GLES2Context::Initialize() {
+ command_buffer_.SetGpuControlClient(this);
no sievers 2016/04/07 21:07:58 Won't GLES2Impl below clobber this and set itself
danakj 2016/04/07 21:45:19 Yes I was doing this wrong like the GLInProcessCon
if (!command_buffer_.Initialize())
return false;
gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(&command_buffer_));
@@ -63,6 +64,8 @@ bool GLES2Context::Initialize() {
gpu::gles2::GLES2Implementation::kNoLimit);
}
-void GLES2Context::ContextLost() { lost_callback_(closure_); }
+void GLES2Context::OnGpuControlLostContext() {
+ lost_callback_(closure_);
+}
} // namespace gles2

Powered by Google App Engine
This is Rietveld 408576698