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

Unified Diff: cc/CCProxy.cpp

Issue 10913158: Avoid using WTF threading code in cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « cc/CCProxy.h ('k') | cc/CCScopedTexture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCProxy.cpp
diff --git a/cc/CCProxy.cpp b/cc/CCProxy.cpp
index 2e893988f2a4facdfb3658705e18cf9b5fff5000..b0894424d904b0d879650237cdb9bdb3f848fd63 100644
--- a/cc/CCProxy.cpp
+++ b/cc/CCProxy.cpp
@@ -17,7 +17,7 @@ namespace {
#ifndef NDEBUG
bool implThreadIsOverridden = false;
bool s_isMainThreadBlocked = false;
-ThreadIdentifier threadIDOverridenToBeImplThread;
+base::PlatformThreadId threadIDOverridenToBeImplThread;
#endif
CCThread* s_mainThread = 0;
CCThread* s_implThread = 0;
@@ -50,7 +50,7 @@ CCThread* CCProxy::implThread()
CCThread* CCProxy::currentThread()
{
- ThreadIdentifier currentThreadIdentifier = WTF::currentThread();
+ base::PlatformThreadId currentThreadIdentifier = base::PlatformThread::CurrentId();
if (s_mainThread && s_mainThread->threadID() == currentThreadIdentifier)
return s_mainThread;
if (s_implThread && s_implThread->threadID() == currentThreadIdentifier)
@@ -62,24 +62,24 @@ CCThread* CCProxy::currentThread()
bool CCProxy::isMainThread()
{
ASSERT(s_mainThread);
- if (implThreadIsOverridden && WTF::currentThread() == threadIDOverridenToBeImplThread)
+ if (implThreadIsOverridden && base::PlatformThread::CurrentId() == threadIDOverridenToBeImplThread)
return false;
- return WTF::currentThread() == s_mainThread->threadID();
+ return base::PlatformThread::CurrentId() == s_mainThread->threadID();
}
bool CCProxy::isImplThread()
{
- WTF::ThreadIdentifier implThreadID = s_implThread ? s_implThread->threadID() : 0;
- if (implThreadIsOverridden && WTF::currentThread() == threadIDOverridenToBeImplThread)
+ base::PlatformThreadId implThreadID = s_implThread ? s_implThread->threadID() : 0;
+ if (implThreadIsOverridden && base::PlatformThread::CurrentId() == threadIDOverridenToBeImplThread)
return true;
- return WTF::currentThread() == implThreadID;
+ return base::PlatformThread::CurrentId() == implThreadID;
}
void CCProxy::setCurrentThreadIsImplThread(bool isImplThread)
{
implThreadIsOverridden = isImplThread;
if (isImplThread)
- threadIDOverridenToBeImplThread = WTF::currentThread();
+ threadIDOverridenToBeImplThread = base::PlatformThread::CurrentId();
}
bool CCProxy::isMainThreadBlocked()
« no previous file with comments | « cc/CCProxy.h ('k') | cc/CCScopedTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698