Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: Source/WebCore/platform/graphics/chromium/TextureManager.cpp

Issue 10025037: Merge 114191 - [chromium] Remove viewport memory restrictions (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/TextureManager.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/TextureManager.cpp (revision 114633)
+++ Source/WebCore/platform/graphics/chromium/TextureManager.cpp (working copy)
@@ -39,6 +39,8 @@
namespace {
size_t memoryLimitBytes(size_t viewportMultiplier, const IntSize& viewportSize, size_t minMegabytes, size_t maxMegabytes)
{
+ if (!viewportMultiplier)
+ return maxMegabytes * 1024 * 1024;
if (viewportSize.isEmpty())
return minMegabytes * 1024 * 1024;
return max(minMegabytes * 1024 * 1024, min(maxMegabytes * 1024 * 1024, viewportMultiplier * TextureManager::memoryUseBytes(viewportSize, GraphicsContext3D::RGBA)));
@@ -48,12 +50,13 @@
size_t TextureManager::highLimitBytes(const IntSize& viewportSize)
{
size_t viewportMultiplier, minMegabytes, maxMegabytes;
- viewportMultiplier = 12;
#if OS(ANDROID)
- minMegabytes = 24;
- maxMegabytes = 40;
+ viewportMultiplier = 16;
+ minMegabytes = 32;
+ maxMegabytes = 64;
#else
- minMegabytes = 64;
+ viewportMultiplier = 0;
+ minMegabytes = 0;
maxMegabytes = 128;
#endif
return memoryLimitBytes(viewportMultiplier, viewportSize, minMegabytes, maxMegabytes);
@@ -62,26 +65,18 @@
size_t TextureManager::reclaimLimitBytes(const IntSize& viewportSize)
{
size_t viewportMultiplier, minMegabytes, maxMegabytes;
- viewportMultiplier = 6;
#if OS(ANDROID)
- minMegabytes = 9;
+ viewportMultiplier = 8;
+ minMegabytes = 16;
maxMegabytes = 32;
#else
- minMegabytes = 32;
+ viewportMultiplier = 0;
+ minMegabytes = 0;
maxMegabytes = 64;
#endif
return memoryLimitBytes(viewportMultiplier, viewportSize, minMegabytes, maxMegabytes);
}
-size_t TextureManager::lowLimitBytes(const IntSize& viewportSize)
-{
- size_t viewportMultiplier, minMegabytes, maxMegabytes;
- viewportMultiplier = 1;
- minMegabytes = 2;
- maxMegabytes = 3;
- return memoryLimitBytes(viewportMultiplier, viewportSize, minMegabytes, maxMegabytes);
-}
-
size_t TextureManager::memoryUseBytes(const IntSize& size, GC3Denum textureFormat)
{
// FIXME: This assumes all textures are 1 byte/component.

Powered by Google App Engine
This is Rietveld 408576698