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

Unified Diff: mojo/gles2/gles2_context.h

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.h
diff --git a/mojo/gles2/gles2_context.h b/mojo/gles2/gles2_context.h
index e5dac20225387efca48eff451f9aada3168e4352..4fee21419dbe6c2c477853e64b06af0700b7ce56 100644
--- a/mojo/gles2/gles2_context.h
+++ b/mojo/gles2/gles2_context.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "gpu/command_buffer/client/gpu_control_client.h"
#include "mojo/gles2/command_buffer_client_impl.h"
#include "mojo/public/c/gles2/gles2.h"
@@ -27,14 +28,14 @@ class GLES2Implementation;
namespace gles2 {
-class GLES2Context : public CommandBufferDelegate,
- public MojoGLES2ContextPrivate {
+class GLES2Context : public MojoGLES2ContextPrivate,
+ public gpu::GpuControlClient {
public:
explicit GLES2Context(const std::vector<int32_t>& attribs,
mojo::ScopedMessagePipeHandle command_buffer_handle,
MojoGLES2ContextLost lost_callback,
void* closure);
- ~GLES2Context() override;
+ virtual ~GLES2Context();
bool Initialize();
gpu::gles2::GLES2Interface* interface() const {
@@ -43,7 +44,9 @@ class GLES2Context : public CommandBufferDelegate,
gpu::ContextSupport* context_support() const { return implementation_.get(); }
private:
- void ContextLost() override;
+ // GpuControlClient implementation.
+ void OnGpuControlLostContext() override;
+ void OnGpuControlErrorMessage(const char* message, int32_t id) override {}
CommandBufferClientImpl command_buffer_;
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;

Powered by Google App Engine
This is Rietveld 408576698