diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-15 14:11:20 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2012-05-16 18:46:20 -0700 |
commit | ed2ce36a1fac9f85b65edf34a1c241c2f73d806c (patch) | |
tree | cd96c66cb53e1cce08e4021f086ca1dfb102d4c8 /Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp | |
parent | 7b17ee7dc951f404d93a458a61884d5c1bf6e40f (diff) | |
download | external_webkit-ed2ce36a1fac9f85b65edf34a1c241c2f73d806c.zip external_webkit-ed2ce36a1fac9f85b65edf34a1c241c2f73d806c.tar.gz external_webkit-ed2ce36a1fac9f85b65edf34a1c241c2f73d806c.tar.bz2 |
Allow more layers to be merged (merging fixed)
This will reduce the need to go to single surface rendering mode,
as well as improving jank by reducing the number of surfaces we need.
(tested on a set of popular sites, we now need up to 16 times less
surfaces, commonly 4-5 times less)
bug:5683630 bug:6499283 bug:6366440
Change-Id: I761c6a60279e5b21dca8bc1faccd956be58e3702
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp index 3b6b306..7e5c2ca 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp @@ -238,4 +238,14 @@ void SurfaceCollection::updateLayerPositions(const SkRect& visibleContentRect) #endif } +int SurfaceCollection::backedSize() +{ + int count = 0; + for (unsigned int i = 0; i < m_surfaces.size(); i++) { + if (m_surfaces[i]->needsTexture()) + count++; + } + return count; +} + } // namespace WebCore |