diff options
author | Chris Craik <ccraik@google.com> | 2011-07-29 13:20:09 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-29 13:20:09 -0700 |
commit | 378ae23cfa08acc7ad5c5652f6863267ad6a5165 (patch) | |
tree | 71fbe92a1c61429b9559a65669bc8708f4ea0460 /Source/WebCore/platform/graphics/android | |
parent | 6cff5909d0c0783e083ebd0f9e56df7d178bbdce (diff) | |
parent | 497da5a4386f7ced19a0a26cb136ade3b8fc0373 (diff) | |
download | external_webkit-378ae23cfa08acc7ad5c5652f6863267ad6a5165.zip external_webkit-378ae23cfa08acc7ad5c5652f6863267ad6a5165.tar.gz external_webkit-378ae23cfa08acc7ad5c5652f6863267ad6a5165.tar.bz2 |
Merge "fixed race condition in tile profiling"
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r-- | Source/WebCore/platform/graphics/android/TilesProfiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/TilesProfiler.cpp b/Source/WebCore/platform/graphics/android/TilesProfiler.cpp index 466923a..653d525 100644 --- a/Source/WebCore/platform/graphics/android/TilesProfiler.cpp +++ b/Source/WebCore/platform/graphics/android/TilesProfiler.cpp @@ -97,7 +97,7 @@ void TilesProfiler::nextFrame(int left, int top, int right, int bottom, float sc m_records.append(WTF::Vector<TileProfileRecord>()); - //first two records designate viewport + //first record designates viewport m_records.last().append(TileProfileRecord( left, top, right, bottom, scale, true, (int)(timeDelta * 1000))); @@ -105,7 +105,7 @@ void TilesProfiler::nextFrame(int left, int top, int right, int bottom, float sc void TilesProfiler::nextTile(BaseTile& tile, float scale, bool inView) { - if (!m_enabled || (m_records.size() > MAX_PROF_FRAMES)) + if (!m_enabled || (m_records.size() > MAX_PROF_FRAMES) || (m_records.size() == 0)) return; bool isReady = tile.isTileReady(); @@ -128,7 +128,7 @@ void TilesProfiler::nextTile(BaseTile& tile, float scale, bool inView) void TilesProfiler::nextInval(const IntRect& rect, float scale) { - if (!m_enabled || (m_records.size() > MAX_PROF_FRAMES)) + if (!m_enabled || (m_records.size() > MAX_PROF_FRAMES) || (m_records.size() == 0)) return; m_records.last().append(TileProfileRecord( |