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

Unified Diff: cc/prioritized_texture.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 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: cc/prioritized_texture.cc
diff --git a/cc/prioritized_texture.cc b/cc/prioritized_texture.cc
index bb3ccb899f59aa63aea8b2ec02343004fc2d1a3d..ea014127fb2bd8580561fc860bf50ba4ce8f8de7 100644
--- a/cc/prioritized_texture.cc
+++ b/cc/prioritized_texture.cc
@@ -9,7 +9,6 @@
#include "cc/platform_color.h"
#include "cc/prioritized_texture_manager.h"
#include "cc/priority_calculator.h"
-#include "cc/proxy.h"
#include <algorithm>
using namespace std;
@@ -153,7 +152,7 @@ PrioritizedTexture::Backing::~Backing()
void PrioritizedTexture::Backing::deleteResource(ResourceProvider* resourceProvider)
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
DCHECK(!m_resourceHasBeenDeleted);
#ifndef NDEBUG
DCHECK(resourceProvider == m_resourceProvider);
@@ -166,19 +165,19 @@ void PrioritizedTexture::Backing::deleteResource(ResourceProvider* resourceProvi
bool PrioritizedTexture::Backing::resourceHasBeenDeleted() const
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
return m_resourceHasBeenDeleted;
}
bool PrioritizedTexture::Backing::canBeRecycled() const
{
- DCHECK(Proxy::isImplThread());
+ DCHECK(m_threadChecker.CalledOnValidThread());
return !m_wasAbovePriorityCutoffAtLastPriorityUpdate && !m_inDrawingImplTree;
}
void PrioritizedTexture::Backing::updatePriority()
{
- DCHECK(Proxy::isImplThread() && Proxy::isMainThreadBlocked());
+ DCHECK(m_threadChecker.CalledOnValidThread());
danakj 2012/10/25 05:06:06 The main thread is blocked part here is kinda impo
if (m_owner) {
m_priorityAtLastPriorityUpdate = m_owner->requestPriority();
m_wasAbovePriorityCutoffAtLastPriorityUpdate = m_owner->isAbovePriorityCutoff();
@@ -190,7 +189,7 @@ void PrioritizedTexture::Backing::updatePriority()
void PrioritizedTexture::Backing::updateInDrawingImplTree()
{
- DCHECK(Proxy::isImplThread() && Proxy::isMainThreadBlocked());
+ DCHECK(m_threadChecker.CalledOnValidThread());
danakj 2012/10/25 05:06:06 ditto
m_inDrawingImplTree = !!owner();
if (!m_inDrawingImplTree)
DCHECK(m_priorityAtLastPriorityUpdate == PriorityCalculator::lowestPriority());

Powered by Google App Engine
This is Rietveld 408576698