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

Unified Diff: cc/resource_provider.cc

Issue 11363207: Remove crash instrumentation, since we haven't seen a crash in (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/resource_provider.h ('k') | cc/resource_update_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource_provider.cc
diff --git a/cc/resource_provider.cc b/cc/resource_provider.cc
index d60d66413d2fb8a2ebd38a733456130dc1910965..0107e82b47123117ef99b559529582ab0ca89df3 100644
--- a/cc/resource_provider.cc
+++ b/cc/resource_provider.cc
@@ -23,15 +23,6 @@
using WebKit::WebGraphicsContext3D;
-namespace {
- // Temporary variables for debugging crashes in issue 151428 in canary.
- // Do not use these!
- const int g_debugMaxResourcesTracked = 64;
- unsigned int g_debugZone = 0;
- int64 g_debugResDestroyedCount = 0;
- cc::ResourceProvider::ResourceId g_debugResDestroyed[g_debugMaxResourcesTracked] = { 0 };
-}
-
namespace cc {
static GLenum textureToStorageFormat(GLenum textureFormat)
@@ -233,7 +224,6 @@ void ResourceProvider::deleteResourceInternal(ResourceMap::iterator it)
if (resource->pixels)
delete[] resource->pixels;
- g_debugResDestroyed[g_debugResDestroyedCount % g_debugMaxResourcesTracked] = (*it).first | g_debugZone;
m_resources.erase(it);
}
@@ -352,23 +342,7 @@ const ResourceProvider::Resource* ResourceProvider::lockForRead(ResourceId id)
{
DCHECK(m_threadChecker.CalledOnValidThread());
ResourceMap::iterator it = m_resources.find(id);
-
- if (it == m_resources.end()) {
- int resourceCount = m_resources.size();
- int64 resDestroyedCount = g_debugResDestroyedCount;
- ResourceId resDestroyed[g_debugMaxResourcesTracked];
- for (int64 i = 0; i < g_debugMaxResourcesTracked; ++i)
- resDestroyed[i] = g_debugResDestroyed[i];
- ResourceId resToDestroy = id;
-
- base::debug::Alias(&resourceCount);
- base::debug::Alias(&resDestroyedCount);
- for (int64 i = 0; i < g_debugMaxResourcesTracked; ++i)
- base::debug::Alias(&resDestroyed[i]);
- base::debug::Alias(&resToDestroy);
- CHECK(it != m_resources.end());
- }
-
+ CHECK(it != m_resources.end());
Resource* resource = &it->second;
DCHECK(!resource->lockedForWrite);
DCHECK(!resource->exported);
@@ -678,15 +652,4 @@ bool ResourceProvider::transferResource(WebGraphicsContext3D* context, ResourceI
return true;
}
-void ResourceProvider::debugNotifyEnterZone(unsigned int zone)
-{
- g_debugZone = zone;
-}
-
-void ResourceProvider::debugNotifyLeaveZone()
-{
- g_debugZone = 0;
-}
-
-
} // namespace cc
« no previous file with comments | « cc/resource_provider.h ('k') | cc/resource_update_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698