diff options
3 files changed, 4 insertions, 17 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index c2fd9dd..dda5dee 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -78,7 +78,6 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex) , m_globalButtonMutex(buttonMutex) , m_baseLayerUpdate(true) , m_backgroundColor(SK_ColorWHITE) - , m_prevDrawTime(0) , m_displayRings(false) , m_focusRingTexture(-1) { @@ -499,16 +498,6 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect, { glFinish(); - double currentTime = WTF::currentTime(); - double delta = currentTime - m_prevDrawTime; - - if (delta < FRAMERATE_CAP) { - unsigned int usecs = (FRAMERATE_CAP - delta) * 1E6; - usleep(usecs); - } - - m_prevDrawTime = currentTime; - m_baseLayerLock.lock(); BaseLayerAndroid* baseLayer = m_currentBaseLayer; SkSafeRef(baseLayer); diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.h b/Source/WebCore/platform/graphics/android/GLWebViewState.h index 980dd3c..33a05c6 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.h +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.h @@ -280,7 +280,6 @@ private: SkRegion m_invalidateRegion; SkColor m_backgroundColor; - double m_prevDrawTime; #ifdef MEASURES_PERF unsigned int m_totalTimeCounter; diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp index e4e8af7..0e91dc7 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.cpp +++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp @@ -55,15 +55,14 @@ // We need n textures for one TiledPage, and another n textures for the // second page used when scaling. // In our case, we use 300x300 textures. On the tablet, this equates to -// at least 5 * 3 = 15 textures. We also enable offscreen textures to a maximum -// of 101 textures used (i.e. ~70Mb max, accounting for the double buffer textures) -// Now we switch to Surface Texture, which is triple buffering. In order to -// avoid OOM issue, we limit the bounds number to 0. +// at least 24 textures. That is consuming almost 50MB GPU memory. +// 24*300*300*4(bpp)*2(pages)*3(triple buffering in Surface Texture) = 49.4MB +// In order to avoid OOM issue, we limit the bounds number to 0 for now. // TODO: We should either dynamically change the outer bound by detecting the // HW limit or save further in the GPU memory consumption. #define EXPANDED_TILE_BOUNDS_X 0 #define EXPANDED_TILE_BOUNDS_Y 0 -#define MAX_TEXTURE_ALLOCATION 3+(5+EXPANDED_TILE_BOUNDS_X*2)*(3+EXPANDED_TILE_BOUNDS_Y*2)*2 +#define MAX_TEXTURE_ALLOCATION 3+(6+EXPANDED_TILE_BOUNDS_X*2)*(4+EXPANDED_TILE_BOUNDS_Y*2)*2 #define TILE_WIDTH 300 #define TILE_HEIGHT 300 |