Commit 7e17fdb5 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-18 Anders Carlsson <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Make PageClientImpl::scrollView do hardware blitting
        https://bugs.webkit.org/show_bug.cgi?id=52689

        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::scrollView):
        Clip the scroll rect and scroll the view.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
        Scroll before painting.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 267e9fd7
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Make PageClientImpl::scrollView do hardware blitting
https://bugs.webkit.org/show_bug.cgi?id=52689
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::scrollView):
Clip the scroll rect and scroll the view.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Scroll before painting.
2011-01-18 Anders Carlsson <andersca@apple.com>
 
Reviewed by Darin Adler.
......@@ -135,8 +135,10 @@ void PageClientImpl::displayView()
void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
{
// FIXME: Actually scroll the view contents.
setViewNeedsDisplay(scrollRect);
NSRect clippedScrollRect = NSIntersectionRect(scrollRect, NSOffsetRect(scrollRect, -scrollOffset.width(), -scrollOffset.height()));
[m_wkView translateRectsNeedingDisplayInRect:clippedScrollRect by:scrollOffset];
[m_wkView scrollRect:clippedScrollRect by:scrollOffset];
}
IntSize PageClientImpl::viewSize()
......
......@@ -117,13 +117,16 @@ void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
m_backingStore->incorporateUpdate(updateInfo);
bool shouldScroll = !updateInfo.scrollRect.isEmpty();
if (shouldScroll)
m_webPageProxy->scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
m_webPageProxy->setViewNeedsDisplay(updateInfo.updateRects[i]);
if (!updateInfo.scrollRect.isEmpty()) {
m_webPageProxy->scrollView(updateInfo.scrollRect, updateInfo.scrollOffset);
if (shouldScroll)
m_webPageProxy->displayView();
}
}
void DrawingAreaProxyImpl::sendSetSize()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment