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

Unified Diff: media/gpu/ipc/client/gpu_video_encode_accelerator_host.h

Issue 2627173002: Adds locks for CommandBufferProxyImpl invalidation (Closed)
Patch Set: Created 3 years, 11 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: media/gpu/ipc/client/gpu_video_encode_accelerator_host.h
diff --git a/media/gpu/ipc/client/gpu_video_encode_accelerator_host.h b/media/gpu/ipc/client/gpu_video_encode_accelerator_host.h
index 6630b72e3cc363f152df5967085b8bba7b97a146..5c4c466dd2c4b1d0605ca60fed781fe64766817b 100644
--- a/media/gpu/ipc/client/gpu_video_encode_accelerator_host.h
+++ b/media/gpu/ipc/client/gpu_video_encode_accelerator_host.h
@@ -98,12 +98,19 @@ class GpuVideoEncodeAcceleratorHost
scoped_refptr<gpu::GpuChannelHost> channel_;
+ // Callback to a function that releases |channel_|.
+ base::Callback<void(void)> channel_error_cb_;
+
// Route ID for the associated encoder in the GPU process.
int32_t encoder_route_id_;
// The client that will receive callbacks from the encoder.
Client* client_;
+ // Protect |impl_|. |impl_| is used on media thread, but it can be invalidated
+ // on main thread.
+ base::Lock impl_lock_;
+
// Unowned reference to the gpu::CommandBufferProxyImpl that created us.
// |this| registers as a DeletionObserver of |impl_|, so the reference is
// always valid as long as it is not NULL.

Powered by Google App Engine
This is Rietveld 408576698