| Index: gpu/ipc/client/command_buffer_proxy_impl.h
 | 
| diff --git a/gpu/ipc/client/command_buffer_proxy_impl.h b/gpu/ipc/client/command_buffer_proxy_impl.h
 | 
| index 89300514ca5aec9da9fb5178c788aba04928ad1c..ca4158cdf08b64d5e2718f8b805fad5aafb6371f 100644
 | 
| --- a/gpu/ipc/client/command_buffer_proxy_impl.h
 | 
| +++ b/gpu/ipc/client/command_buffer_proxy_impl.h
 | 
| @@ -96,11 +96,10 @@ class GPU_EXPORT CommandBufferProxyImpl
 | 
|  
 | 
|    // CommandBuffer implementation:
 | 
|    State GetLastState() override;
 | 
| -  int32_t GetLastToken() override;
 | 
|    void Flush(int32_t put_offset) override;
 | 
|    void OrderingBarrier(int32_t put_offset) override;
 | 
| -  void WaitForTokenInRange(int32_t start, int32_t end) override;
 | 
| -  void WaitForGetOffsetInRange(int32_t start, int32_t end) override;
 | 
| +  State WaitForTokenInRange(int32_t start, int32_t end) override;
 | 
| +  State WaitForGetOffsetInRange(int32_t start, int32_t end) override;
 | 
|    void SetGetBuffer(int32_t shm_id) override;
 | 
|    scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size,
 | 
|                                                    int32_t* id) override;
 | 
| @@ -128,6 +127,7 @@ class GPU_EXPORT CommandBufferProxyImpl
 | 
|    bool IsFenceSyncRelease(uint64_t release) override;
 | 
|    bool IsFenceSyncFlushed(uint64_t release) override;
 | 
|    bool IsFenceSyncFlushReceived(uint64_t release) override;
 | 
| +  bool IsFenceSyncReleased(uint64_t release) override;
 | 
|    void SignalSyncToken(const gpu::SyncToken& sync_token,
 | 
|                         const base::Closure& callback) override;
 | 
|    bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
 | 
| @@ -157,12 +157,6 @@ class GPU_EXPORT CommandBufferProxyImpl
 | 
|    void SetUpdateVSyncParametersCallback(
 | 
|        const UpdateVSyncParametersCallback& callback);
 | 
|  
 | 
| -  // TODO(apatrick): this is a temporary optimization while skia is calling
 | 
| -  // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6
 | 
| -  // ints redundantly when only the error is needed for the
 | 
| -  // CommandBufferProxyImpl implementation.
 | 
| -  gpu::error::Error GetLastError() override;
 | 
| -
 | 
|    int32_t route_id() const { return route_id_; }
 | 
|  
 | 
|    const scoped_refptr<GpuChannelHost>& channel() const { return channel_; }
 | 
| @@ -211,6 +205,9 @@ class GPU_EXPORT CommandBufferProxyImpl
 | 
|    // Try to read an updated copy of the state from shared memory, and calls
 | 
|    // OnGpuStateError() if the new state has an error.
 | 
|    void TryUpdateState();
 | 
| +  // Like above but calls the error handler and disconnects channel by posting
 | 
| +  // a task.
 | 
| +  void TryUpdateStateThreadSafe();
 | 
|    // Like the above but does not call the error event handler if the new state
 | 
|    // has an error.
 | 
|    void TryUpdateStateDontReportError();
 | 
| @@ -240,6 +237,10 @@ class GPU_EXPORT CommandBufferProxyImpl
 | 
|    // The shared memory area used to update state.
 | 
|    gpu::CommandBufferSharedState* shared_state() const;
 | 
|  
 | 
| +  // Lock to access shared state e.g. sync token release count across multiple
 | 
| +  // threads. This allows tracking command buffer progress from another thread.
 | 
| +  base::Lock state_lock_;
 | 
| +
 | 
|    // There should be a lock_ if this is going to be used across multiple
 | 
|    // threads, or we guarantee it is used by a single thread by using a thread
 | 
|    // checker if no lock_ is set.
 | 
| 
 |