diff options
author | Chris Craik <ccraik@google.com> | 2012-07-12 16:43:47 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-07-12 16:47:51 -0700 |
commit | 0453f79675ffe6fddb59add2dcee0e3f0e7e74b1 (patch) | |
tree | 4ed5e328618b91778bede9dbd24b42875bffc869 /Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h | |
parent | 675402ef4358583f64a2476927a548db4841c856 (diff) | |
download | external_webkit-0453f79675ffe6fddb59add2dcee0e3f0e7e74b1.zip external_webkit-0453f79675ffe6fddb59add2dcee0e3f0e7e74b1.tar.gz external_webkit-0453f79675ffe6fddb59add2dcee0e3f0e7e74b1.tar.bz2 |
Don't prepare in invoke mode unless needed
A change in collection, visible rect or scale will cause a re-prepare in invoke
mode. Always re-prepare in draw mode to keep updating tile draw counts - this
way a scrolling webview doesn't steal tiles unjustly from a non-scrolling
webview.
Change-Id: Idf9f88afe36b582a3aa0369cfb76d8e47e5d3da6
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h index 53b5bb6..70b84df 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.h @@ -26,10 +26,10 @@ #ifndef SurfaceCollectionManager_h #define SurfaceCollectionManager_h +#include "SkRect.h" #include "TestExport.h" #include <utils/threads.h> -class SkRect; class SkCanvas; namespace WebCore { @@ -60,6 +60,9 @@ private: void clearCollections(); void updatePaintingCollection(SurfaceCollection* newCollection); int singleSurfaceModeInvalidation(bool hasRunningAnimation, bool scrolling, bool shouldDraw); + void prepareGL(SurfaceCollection* collection, SkRect& visibleContentRect, float scale, + TexturesResult* texturesResultPtr, bool shouldDraw, bool tryFastBlit); + SurfaceCollection* m_drawingCollection; SurfaceCollection* m_paintingCollection; SurfaceCollection* m_queuedCollection; @@ -70,6 +73,10 @@ private: // Used in single surface mode only. True if there is a new painting tree // added for the current frame. bool m_newPaintingCollection; + + SurfaceCollection* m_lastPreparedCollection; + SkRect m_lastPreparedRect; + float m_lastPreparedScale; }; } // namespace WebCore |