[chromium] Always pre-reserve scrollbar and scroll corner textures
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jan 2012 22:10:07 +0000 (22:10 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jan 2012 22:10:07 +0000 (22:10 +0000)
commitbcd53c5432b6bd04fb268e32c26b167d3ce0b983
tree3310ca36ee97d814ad5999181c5e19fa0f98a3fc
parent93be7539ebc6b54c567891b3535d8186c003dca2
[chromium] Always pre-reserve scrollbar and scroll corner textures
https://bugs.webkit.org/show_bug.cgi?id=77251

Reviewed by James Robinson.

Source/WebCore:

Add a flag to LayerChromium that says that a layer's textures should
always be reserved. Prior to painting layers, find all layers marked
as such and reserve their textures. This will prevent texture memory
limits from being hit before the root layer's scrollbars are reserved
and painted.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
(WebCore::LayerChromium::reserveTextures):
(WebCore::LayerChromium::setAlwaysReserveTextures):
(WebCore::LayerChromium::alwaysReserveTextures):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::reserveTextures):
* platform/graphics/chromium/TiledLayerChromium.h:
():
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):
(WebCore::CCLayerTreeHost::reserveTextures):
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
():

Source/WebKit/chromium:

* src/NonCompositedContentHost.cpp:
(WebKit::reserveScrollbarLayers):
(WebKit):
(WebKit::NonCompositedContentHost::setViewport):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/NonCompositedContentHost.cpp