diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/TilesManager.h')
-rw-r--r-- | Source/WebCore/platform/graphics/android/TilesManager.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/Source/WebCore/platform/graphics/android/TilesManager.h b/Source/WebCore/platform/graphics/android/TilesManager.h index 0a2fb798..25e487d 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.h +++ b/Source/WebCore/platform/graphics/android/TilesManager.h @@ -31,17 +31,19 @@ #include "BaseTile.h" #include "BaseTileTexture.h" #include "LayerAndroid.h" -#include "LayerTexture.h" #include "ShaderProgram.h" #include "TexturesGenerator.h" #include "TiledPage.h" #include "TilesProfiler.h" +#include "TilesTracker.h" #include "VideoLayerManager.h" #include <utils/threads.h> #include <wtf/HashMap.h> namespace WebCore { +class PaintedSurface; + class TilesManager { public: static TilesManager* instance(); @@ -53,24 +55,24 @@ public: return gInstance != 0; } - void removeOperationsForPage(TiledPage* page) + void removeOperationsForFilter(OperationFilter* filter, bool waitForRunning = false) { - m_pixmapsGenerationThread->removeOperationsForPage(page); + m_pixmapsGenerationThread->removeOperationsForFilter(filter, waitForRunning); } - void removePaintOperationsForPage(TiledPage* page, bool waitForCompletion) + void removeOperationsForPage(TiledPage* page) { - m_pixmapsGenerationThread->removePaintOperationsForPage(page, waitForCompletion); + m_pixmapsGenerationThread->removeOperationsForPage(page); } - void removeOperationsForBaseLayer(BaseLayerAndroid* layer) + void removeOperationsForPainter(TilePainter* painter, bool waitForCompletion) { - m_pixmapsGenerationThread->removeOperationsForBaseLayer(layer); + m_pixmapsGenerationThread->removeOperationsForPainter(painter, waitForCompletion); } - void removeOperationsForTexture(LayerTexture* texture) + void removePaintOperationsForPage(TiledPage* page, bool waitForCompletion) { - m_pixmapsGenerationThread->removeOperationsForTexture(texture); + m_pixmapsGenerationThread->removePaintOperationsForPage(page, waitForCompletion); } void scheduleOperation(QueuedOperation* operation) @@ -78,16 +80,15 @@ public: m_pixmapsGenerationThread->scheduleOperation(operation); } + void swapLayersTextures(LayerAndroid* newTree, LayerAndroid* oldTree); + void addPaintedSurface(PaintedSurface* surface); + ShaderProgram* shader() { return &m_shader; } VideoLayerManager* videoLayerManager() { return &m_videoLayerManager; } BaseTileTexture* getAvailableTexture(BaseTile* owner); - void printLayersTextures(const char* s); - void cleanupLayersTextures(LayerAndroid* layer, bool forceCleanup = false); - LayerTexture* getExistingTextureForLayer(LayerAndroid* layer, const IntRect& rect, - bool any = false, LayerTexture* texture = 0); - LayerTexture* createTextureForLayer(LayerAndroid* layer, const IntRect& rect); + void cleanupTilesTextures(); void markGeneratorAsReady() { @@ -108,6 +109,8 @@ public: void setMaxTextureCount(int max); static float tileWidth(); static float tileHeight(); + static float layerTileWidth(); + static float layerTileHeight(); int expandedTileBoundsX(); int expandedTileBoundsY(); void registerGLWebViewState(GLWebViewState* state); @@ -132,7 +135,11 @@ public: } TilesProfiler* getProfiler() { - return &profiler; + return &m_profiler; + } + + TilesTracker* getTilesTracker() { + return &m_tilesTracker; } private: @@ -147,7 +154,8 @@ private: } Vector<BaseTileTexture*> m_textures; - Vector<LayerTexture*> m_layersTextures; + Vector<BaseTileTexture*> m_tilesTextures; + Vector<PaintedSurface*> m_paintedSurfaces; unsigned int m_layersMemoryUsage; @@ -174,7 +182,8 @@ private: unsigned int getGLWebViewStateDrawCount(GLWebViewState* state); - TilesProfiler profiler; + TilesProfiler m_profiler; + TilesTracker m_tilesTracker; }; } // namespace WebCore |