summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GLWebViewState.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-01-30 15:34:46 -0800
committerNicolas Roard <nicolas@android.com>2011-01-30 17:11:52 -0800
commitda44133fe92ec11fa6b904c498e7e5cd23a43cbf (patch)
tree9fb27831c884476be59161bd16fd0427412a1865 /WebCore/platform/graphics/android/GLWebViewState.cpp
parent49e6e531daf99d2349caab00380648b689e7c1dc (diff)
downloadexternal_webkit-da44133fe92ec11fa6b904c498e7e5cd23a43cbf.zip
external_webkit-da44133fe92ec11fa6b904c498e7e5cd23a43cbf.tar.gz
external_webkit-da44133fe92ec11fa6b904c498e7e5cd23a43cbf.tar.bz2
Add a ClassTracker class to more easily track leaks
bug:3376517 Change-Id: Ieb419bc3140963ccbda3e2f130778ec53b2920aa
Diffstat (limited to 'WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index fa1b055..2f9430a 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -29,6 +29,7 @@
#if USE(ACCELERATED_COMPOSITING)
#include "BaseLayerAndroid.h"
+#include "ClassTracker.h"
#include "LayerAndroid.h"
#include "TilesManager.h"
@@ -55,14 +56,6 @@ namespace WebCore {
using namespace android;
-#ifdef DEBUG_COUNT
-static int gGLWebViewStateCount = 0;
-int GLWebViewState::count()
-{
- return gGLWebViewStateCount;
-}
-#endif
-
GLWebViewState::GLWebViewState(android::Mutex* buttonMutex)
: m_scaleRequestState(kNoScaleRequest)
, m_currentScale(1)
@@ -85,7 +78,7 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex)
m_tiledPageA = new TiledPage(FIRST_TILED_PAGE_ID, this);
m_tiledPageB = new TiledPage(SECOND_TILED_PAGE_ID, this);
#ifdef DEBUG_COUNT
- gGLWebViewStateCount++;
+ ClassTracker::instance()->increment("GLWebViewState");
#endif
}
@@ -95,7 +88,7 @@ GLWebViewState::~GLWebViewState()
delete m_tiledPageA;
delete m_tiledPageB;
#ifdef DEBUG_COUNT
- gGLWebViewStateCount--;
+ ClassTracker::instance()->decrement("GLWebViewState");
#endif
}