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

Unified Diff: cc/video_layer_impl.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « cc/tree_synchronizer_unittest.cc ('k') | webkit/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « cc/tree_synchronizer_unittest.cc ('k') | webkit/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698