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

Unified Diff: cc/scoped_texture.cc

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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
« no previous file with comments | « cc/scoped_texture.h ('k') | cc/scoped_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scoped_texture.cc
diff --git a/cc/scoped_texture.cc b/cc/scoped_texture.cc
index d43ebe33019e1af0237353540c75736cd3c33db7..ff54056721466f4168b5ba22de9bbc728d7c362e 100644
--- a/cc/scoped_texture.cc
+++ b/cc/scoped_texture.cc
@@ -11,7 +11,7 @@ namespace cc {
CCScopedTexture::CCScopedTexture(CCResourceProvider* resourceProvider)
: m_resourceProvider(resourceProvider)
{
- ASSERT(m_resourceProvider);
+ DCHECK(m_resourceProvider);
}
CCScopedTexture::~CCScopedTexture()
@@ -21,13 +21,13 @@ CCScopedTexture::~CCScopedTexture()
bool CCScopedTexture::allocate(int pool, const IntSize& size, GC3Denum format, CCResourceProvider::TextureUsageHint hint)
{
- ASSERT(!id());
- ASSERT(!size.isEmpty());
+ DCHECK(!id());
+ DCHECK(!size.isEmpty());
setDimensions(size, format);
setId(m_resourceProvider->createResource(pool, size, format, hint));
-#if !ASSERT_DISABLED
+#ifndef NDEBUG
m_allocateThreadIdentifier = base::PlatformThread::CurrentId();
#endif
@@ -37,7 +37,9 @@ bool CCScopedTexture::allocate(int pool, const IntSize& size, GC3Denum format, C
void CCScopedTexture::free()
{
if (id()) {
- ASSERT(m_allocateThreadIdentifier == base::PlatformThread::CurrentId());
+#ifndef NDEBUG
+ DCHECK(m_allocateThreadIdentifier == base::PlatformThread::CurrentId());
+#endif
m_resourceProvider->deleteResource(id());
}
setId(0);
« no previous file with comments | « cc/scoped_texture.h ('k') | cc/scoped_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698