[chromium] Do not delete texture backing structures on the main thread
https://bugs.webkit.org/show_bug.cgi?id=96018

Patch by Christopher Cameron <ccameron@chromium.org> on 2012-09-09
Reviewed by James Robinson.

Do not delete CCPrioritizedTexture::Backing structures on the main
thread.  Instead, unlink them from their owning CCPrioritizedTexture
in the main thread, and have the impl thread then delete all unlinked
textures.

This is towards having the main thread not access the m_backings set,
which will allow the impl thread to traverse that set when deleting
resources in response to GPU memory management events.

Tested by existing eviction tests (CCLayerTreeHostTest's
TestEvictTextures, LostContextAfterEvictTextures)

Fix a place where single thread proxy wasn't setting the main thread
blocked state correctly.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::unlinkAllContentTextures):
(WebCore):
(WebCore::CCLayerTreeHost::deleteUnlinkedTextures):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
(WebCore::CCPrioritizedTextureManager::clearAllMemory):
(WebCore::CCPrioritizedTextureManager::unlinkAllBackings):
(WebCore):
(WebCore::CCPrioritizedTextureManager::deleteAllUnlinkedBackings):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
(CCPrioritizedTextureManager):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::commitAndComposite):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrame):
(WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
https://bugs.webkit.org/show_bug.cgi?id=81413

Reviewed by David Hyatt.

Source/WebCore:

Rename Node::getRect and getPixelSnappedRect to boundingBox and
pixelSnappedBoundingBox respectively.

Remove overridden getRect method from ContainerNode as it calculates the
same rect as the Node implementation but in a more complicated and
error-prone way. Also remove the getUpperLeftCorner/getLowerRightCorner
support functions as they are no longer needed.

No new tests, no change in functionality.

* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySliderThumb::elementRect):
Update to call boundingBox.

* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
Remove overridden getRect method and the getUpperLeftCorner/
getLowerRightCorner support methods .

* dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::updateFocusAppearance):
Update to call boundingBox.

* dom/Node.h:
* dom/Node.cpp:
(WebCore::Node::boundingBox):
Rename getRect to boundingBox.

(WebCore::Node::pixelSnappedBoundingBox):
Rename getPixelSnappedRect to pixelSnappedBoundingBox.

* html/ColorInputType.cpp:
(WebCore::ColorInputType::elementRectRelativeToRootView):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::openPopup):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):
* page/SpatialNavigation.cpp:
(WebCore::nodeRectInAbsoluteCoordinates):
Update to call boundingBox/pixelSnappedBoundingBox.

Source/WebKit/chromium:

Update WebViewImpl to call boundingBox/pixelSnappedBoundingBox.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::computeBlockBounds):
(WebKit::WebViewImpl::applyAutofillSuggestions):
(WebKit::WebViewImpl::refreshAutofillPopup):

Source/WebKit/efl:

Update ewk_frame to call pixelSnappedBoundingBox.

* ewk/ewk_frame.cpp:
(ewk_frame_focused_element_geometry_get):

Source/WebKit/gtk:

Update ChromeClientGtk and webkitwebview to call pixelSnappedBoundingBox.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::mouseDidMoveOverElement):
* webkit/webkitwebview.cpp:
(getLocationForKeyboardGeneratedContextMenu):
(webkit_web_view_query_tooltip):

Source/WebKit/qt:

Update qwebelement and qwebpage to call pixelSnappedBoundingBox.

* Api/qwebelement.cpp:
(QWebElement::geometry):
(QWebElement::render):
* Api/qwebpage.cpp:
(QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):

Source/WebKit2:

Update WebPage to call pixelSnappedBoundingBox.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening after r127907

Fix CCRenderPassTest::copyShouldBeIdenticalExceptIdAndQuads

* tests/CCRenderPassTest.cpp:
(CCRenderPassSize): Changed type of m_id

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128007 268f45cc-cd09-0410-ab3c-d52691b4dbfc