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

Unified Diff: services/gles2/command_buffer_impl.h

Issue 1123623003: Automatically redraw the display on resume. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Response to review Created 5 years, 7 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 | « no previous file | services/gles2/command_buffer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gles2/command_buffer_impl.h
diff --git a/services/gles2/command_buffer_impl.h b/services/gles2/command_buffer_impl.h
index a6bf27d0c3fc1a68c681189db14480cbf90db69f..44bf85ba23d861127ab25699409cb9be867a8807 100644
--- a/services/gles2/command_buffer_impl.h
+++ b/services/gles2/command_buffer_impl.h
@@ -25,6 +25,11 @@ class CommandBufferDriver;
// same thread as the native viewport.
class CommandBufferImpl : public mojo::CommandBuffer {
public:
+ class Observer {
+ public:
+ virtual void OnCommandBufferImplDestroyed() = 0;
+ };
+
CommandBufferImpl(
mojo::InterfaceRequest<CommandBuffer> request,
mojo::ViewportParameterListenerPtr listener,
@@ -52,6 +57,8 @@ class CommandBufferImpl : public mojo::CommandBuffer {
void UpdateVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval);
+ void set_observer(Observer* observer) { observer_ = observer; }
+
private:
void BindToRequest(mojo::InterfaceRequest<CommandBuffer> request);
@@ -61,6 +68,7 @@ class CommandBufferImpl : public mojo::CommandBuffer {
mojo::CommandBufferSyncPointClientPtr sync_point_client_;
mojo::ViewportParameterListenerPtr viewport_parameter_listener_;
mojo::StrongBinding<CommandBuffer> binding_;
+ Observer* observer_;
base::WeakPtrFactory<CommandBufferImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(CommandBufferImpl);
« no previous file with comments | « no previous file | services/gles2/command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698