diff options
Diffstat (limited to 'cc/video_layer_impl.cc')
-rw-r--r-- | cc/video_layer_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/video_layer_impl.cc b/cc/video_layer_impl.cc index f958ccf..45f6ed6 100644 --- a/cc/video_layer_impl.cc +++ b/cc/video_layer_impl.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "cc/io_surface_draw_quad.h" #include "cc/layer_tree_host_impl.h" +#include "cc/proxy.h" #include "cc/quad_sink.h" #include "cc/resource_provider.h" #include "cc/stream_video_draw_quad.h" @@ -42,12 +43,14 @@ VideoLayerImpl::VideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provider, // thread is blocked. That makes this a thread-safe call to set the video // frame provider client that does not require a lock. The same is true of // the call in the destructor. + DCHECK(Proxy::isMainThreadBlocked()); m_provider->setVideoFrameProviderClient(this); } VideoLayerImpl::~VideoLayerImpl() { // See comment in constructor for why this doesn't need a lock. + DCHECK(Proxy::isMainThreadBlocked()); if (m_provider) { m_provider->setVideoFrameProviderClient(0); m_provider = 0; @@ -116,6 +119,7 @@ size_t VideoLayerImpl::numPlanes() const void VideoLayerImpl::willDraw(ResourceProvider* resourceProvider) { + DCHECK(Proxy::isImplThread()); LayerImpl::willDraw(resourceProvider); // Explicitly acquire and release the provider mutex so it can be held from @@ -136,6 +140,7 @@ void VideoLayerImpl::willDraw(ResourceProvider* resourceProvider) void VideoLayerImpl::willDrawInternal(ResourceProvider* resourceProvider) { + DCHECK(Proxy::isImplThread()); DCHECK(!m_externalTextureResource); if (!m_provider) { @@ -186,6 +191,8 @@ void VideoLayerImpl::willDrawInternal(ResourceProvider* resourceProvider) void VideoLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData) { + DCHECK(Proxy::isImplThread()); + if (!m_frame) return; @@ -246,6 +253,7 @@ void VideoLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad void VideoLayerImpl::didDraw(ResourceProvider* resourceProvider) { + DCHECK(Proxy::isImplThread()); LayerImpl::didDraw(resourceProvider); if (!m_frame) |