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

Unified Diff: mojo/gles2/command_buffer_client_impl.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/command_buffer_client_impl.h
diff --git a/mojo/gles2/command_buffer_client_impl.h b/mojo/gles2/command_buffer_client_impl.h
index 995ff1c9511950c73155eb23800a3f548585176e..a546023621144e0e52055afa025a0057808bd25f 100644
--- a/mojo/gles2/command_buffer_client_impl.h
+++ b/mojo/gles2/command_buffer_client_impl.h
@@ -27,19 +27,12 @@ class RunLoop;
namespace gles2 {
class CommandBufferClientImpl;
-class CommandBufferDelegate {
- public:
- virtual ~CommandBufferDelegate();
- virtual void ContextLost();
-};
-
class CommandBufferClientImpl
: public mus::mojom::CommandBufferClient,
public gpu::CommandBuffer,
public gpu::GpuControl {
public:
explicit CommandBufferClientImpl(
- CommandBufferDelegate* delegate,
const std::vector<int32_t>& attribs,
mojo::ScopedMessagePipeHandle command_buffer_handle);
~CommandBufferClientImpl() override;
@@ -58,6 +51,7 @@ class CommandBufferClientImpl
void DestroyTransferBuffer(int32_t id) override;
// gpu::GpuControl implementation:
+ void SetGpuControlClient(gpu::GpuControlClient*) override;
gpu::Capabilities GetCapabilities() override;
int32_t CreateImage(ClientBuffer buffer,
size_t width,
@@ -96,7 +90,8 @@ class CommandBufferClientImpl
gpu::CommandBufferSharedState* shared_state() const { return shared_state_; }
- CommandBufferDelegate* delegate_;
+ gpu::GpuControlClient* gpu_control_client_;
+ bool destroyed_;
std::vector<int32_t> attribs_;
mojo::Binding<mus::mojom::CommandBufferClient> client_binding_;
mus::mojom::CommandBufferPtr command_buffer_;

Powered by Google App Engine
This is Rietveld 408576698