Index: cc/video_layer_impl.cc |
=================================================================== |
--- cc/video_layer_impl.cc (revision 165906) |
+++ cc/video_layer_impl.cc (working copy) |
@@ -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 @@ |
// 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 @@ |
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::willDrawInternal(ResourceProvider* resourceProvider) |
{ |
+ DCHECK(Proxy::isImplThread()); |
DCHECK(!m_externalTextureResource); |
if (!m_provider) { |
@@ -186,6 +191,8 @@ |
void VideoLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData) |
{ |
+ DCHECK(Proxy::isImplThread()); |
+ |
if (!m_frame) |
return; |
@@ -246,6 +253,7 @@ |
void VideoLayerImpl::didDraw(ResourceProvider* resourceProvider) |
{ |
+ DCHECK(Proxy::isImplThread()); |
LayerImpl::didDraw(resourceProvider); |
if (!m_frame) |