diff options
| author | John Reck <jreck@google.com> | 2011-11-21 21:07:35 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-21 21:07:35 -0800 |
| commit | be5a48f03761c980b096111d62e9ca03624e8364 (patch) | |
| tree | 14aacc0c566f83ccf7160ec3df617e07d1b945fd /Source/WebCore | |
| parent | 96309385b22eca3b1ff3eb9d30bea0958ce47875 (diff) | |
| parent | bd996ca3728f985d3fee81471268643ca772ed40 (diff) | |
| download | external_webkit-be5a48f03761c980b096111d62e9ca03624e8364.zip external_webkit-be5a48f03761c980b096111d62e9ca03624e8364.tar.gz external_webkit-be5a48f03761c980b096111d62e9ca03624e8364.tar.bz2 | |
am bd996ca3: Merge "Use isHighEndGfx to double textures" into ics-mr1
* commit 'bd996ca3728f985d3fee81471268643ca772ed40':
Use isHighEndGfx to double textures
Diffstat (limited to 'Source/WebCore')
3 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index 6e2d3b7..77bc208 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -86,6 +86,7 @@ GLWebViewState::GLWebViewState() , m_expandedTileBoundsY(0) , m_scale(1) , m_layersRenderingMode(kAllTextures) + , m_highEndGfx(false) { m_viewport.setEmpty(); m_futureViewportTileBounds.setEmpty(); @@ -262,7 +263,7 @@ void GLWebViewState::setViewport(SkRect& viewport, float scale) int viewMaxTileY = static_cast<int>(ceilf((viewport.height()-1) * invTileContentHeight)) + 1; int maxTextureCount = (viewMaxTileX + m_expandedTileBoundsX * 2) * - (viewMaxTileY + m_expandedTileBoundsY * 2) * 2; + (viewMaxTileY + m_expandedTileBoundsY * 2) * (m_highEndGfx ? 4 : 2); TilesManager::instance()->setMaxTextureCount(maxTextureCount); m_tiledPageA->updateBaseTileSize(); diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.h b/Source/WebCore/platform/graphics/android/GLWebViewState.h index 5aa030b..2a6c8df 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.h +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.h @@ -233,6 +233,7 @@ public: int expandedTileBoundsX() { return m_expandedTileBoundsX; } int expandedTileBoundsY() { return m_expandedTileBoundsY; } + void setHighEndGfx(bool highEnd) { m_highEndGfx = highEnd; } float scale() { return m_scale; } @@ -282,6 +283,7 @@ private: int m_expandedTileBoundsX; int m_expandedTileBoundsY; + bool m_highEndGfx; float m_scale; diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp index 8339221..219435d 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.cpp +++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp @@ -69,7 +69,7 @@ // number to cap the layer tile texturs, it worked on both phones and tablets. // TODO: after merge the pool of base tiles and layer tiles, we should revisit // the logic of allocation management. -#define MAX_TEXTURE_ALLOCATION ((6+TILE_PREFETCH_DISTANCE*2)*(5+TILE_PREFETCH_DISTANCE*2)*2) +#define MAX_TEXTURE_ALLOCATION ((6+TILE_PREFETCH_DISTANCE*2)*(5+TILE_PREFETCH_DISTANCE*2)*4) #define TILE_WIDTH 256 #define TILE_HEIGHT 256 #define LAYER_TILE_WIDTH 256 |
