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

Unified Diff: cc/CCResourceProvider.cpp

Issue 10898023: Update cc snapshot to WK r126941 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 8 years, 4 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/CCRenderSurfaceTest.cpp ('k') | cc/CCScrollbarGeometryStub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCResourceProvider.cpp
diff --git a/cc/CCResourceProvider.cpp b/cc/CCResourceProvider.cpp
index 2f575ed8407f3940bafa777c0749ad4ed49d2fc6..7acdadd6db5123ce437bdb096733aa3f67065bce 100644
--- a/cc/CCResourceProvider.cpp
+++ b/cc/CCResourceProvider.cpp
@@ -134,7 +134,9 @@ void CCResourceProvider::deleteResource(ResourceId id)
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && !it->second.lockedForWrite && !it->second.lockForReadCount);
+ ASSERT(it != m_resources.end());
+ ASSERT(!it->second.lockedForWrite);
+ ASSERT(!it->second.lockForReadCount);
if (it->second.glId && !it->second.external) {
WebGraphicsContext3D* context3d = m_context->context3D();
@@ -170,7 +172,10 @@ void CCResourceProvider::upload(ResourceId id, const uint8_t* image, const IntRe
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && !it->second.lockedForWrite && !it->second.lockForReadCount && !it->second.external);
+ ASSERT(it != m_resources.end());
+ ASSERT(!it->second.lockedForWrite);
+ ASSERT(!it->second.lockForReadCount);
+ ASSERT(!it->second.external);
if (it->second.glId) {
WebGraphicsContext3D* context3d = m_context->context3D();
@@ -218,7 +223,8 @@ const CCResourceProvider::Resource* CCResourceProvider::lockForRead(ResourceId i
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && !it->second.lockedForWrite);
+ ASSERT(it != m_resources.end());
+ ASSERT(!it->second.lockedForWrite);
it->second.lockForReadCount++;
return &it->second;
}
@@ -227,7 +233,8 @@ void CCResourceProvider::unlockForRead(ResourceId id)
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && it->second.lockForReadCount > 0);
+ ASSERT(it != m_resources.end());
+ ASSERT(it->second.lockForReadCount > 0);
it->second.lockForReadCount--;
}
@@ -235,7 +242,10 @@ const CCResourceProvider::Resource* CCResourceProvider::lockForWrite(ResourceId
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && !it->second.lockedForWrite && !it->second.lockForReadCount && !it->second.external);
+ ASSERT(it != m_resources.end());
+ ASSERT(!it->second.lockedForWrite);
+ ASSERT(!it->second.lockForReadCount);
+ ASSERT(!it->second.external);
it->second.lockedForWrite = true;
return &it->second;
}
@@ -244,7 +254,9 @@ void CCResourceProvider::unlockForWrite(ResourceId id)
{
ASSERT(CCProxy::isImplThread());
ResourceMap::iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && it->second.lockedForWrite && !it->second.external);
+ ASSERT(it != m_resources.end());
+ ASSERT(it->second.lockedForWrite);
+ ASSERT(!it->second.external);
it->second.lockedForWrite = false;
}
@@ -485,7 +497,10 @@ bool CCResourceProvider::transferResource(WebGraphicsContext3D* context, Resourc
{
ASSERT(CCProxy::isImplThread());
ResourceMap::const_iterator it = m_resources.find(id);
- ASSERT(it != m_resources.end() && !it->second.lockedForWrite && !it->second.lockForReadCount && !it->second.external);
+ ASSERT(it != m_resources.end());
+ ASSERT(!it->second.lockedForWrite);
+ ASSERT(!it->second.lockForReadCount);
+ ASSERT(!it->second.external);
if (it->second.exported)
return false;
resource->id = id;
« no previous file with comments | « cc/CCRenderSurfaceTest.cpp ('k') | cc/CCScrollbarGeometryStub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698