Changeset 59611 in webkit
- Timestamp:
- May 17, 2010 8:34:14 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r59610 r59611 1 2010-05-17 Antti Koivisto <koivisto@iki.fi> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 https://bugs.webkit.org/show_bug.cgi?id=39218 6 [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation 7 8 Tiles sometimes flicker when exiting a zoom animation. This happens as a result 9 of the visible rectangle being momentarily out of sync. 10 11 Instead of updating the visible rect by explicitly setting it, pull it through 12 the client and recompute in the WebKit level. 13 14 * page/ChromeClient.h: 15 (WebCore::ChromeClient::visibleRectForTiledBackingStore): 16 * page/Frame.cpp: 17 (WebCore::Frame::tiledBackingStoreVisibleRect): 18 * page/Frame.h: 19 * platform/graphics/TiledBackingStore.cpp: 20 (WebCore::TiledBackingStore::checkVisibleRectChanged): 21 (WebCore::TiledBackingStore::createTiles): 22 * platform/graphics/TiledBackingStore.h: 23 * platform/graphics/TiledBackingStoreClient.h: 24 1 25 2010-05-15 Adam Roben <aroben@apple.com> 2 26 -
trunk/WebCore/page/ChromeClient.h
r57961 r59611 223 223 virtual void enterFullscreenForNode(Node*) { } 224 224 virtual void exitFullscreenForNode(Node*) { } 225 225 226 #if ENABLE(TILED_BACKING_STORE) 227 virtual IntRect visibleRectForTiledBackingStore() const { return IntRect(); } 228 #endif 229 226 230 #if PLATFORM(MAC) 227 231 virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; } -
trunk/WebCore/page/Frame.cpp
r59384 r59611 37 37 #include "CachedCSSStyleSheet.h" 38 38 #include "Chrome.h" 39 #include "ChromeClient.h" 39 40 #include "DOMWindow.h" 40 41 #include "DocLoader.h" … … 1844 1845 return IntRect(IntPoint(), m_view->contentsSize()); 1845 1846 } 1847 1848 IntRect Frame::tiledBackingStoreVisibleRect() 1849 { 1850 if (!m_page) 1851 return IntRect(); 1852 return m_page->chrome()->client()->visibleRectForTiledBackingStore(); 1853 } 1846 1854 #endif 1847 1855 -
trunk/WebCore/page/Frame.h
r59384 r59611 295 295 virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea); 296 296 virtual IntRect tiledBackingStoreContentsRect(); 297 virtual IntRect tiledBackingStoreVisibleRect(); 297 298 #endif 298 299 -
trunk/WebCore/platform/graphics/TiledBackingStore.cpp
r59363 r59611 132 132 } 133 133 134 void TiledBackingStore::viewportChanged(const IntRect& contentsViewport) 135 { 136 IntRect viewport = mapFromContents(contentsViewport); 137 if (m_viewport == viewport) 138 return; 139 140 m_viewport = viewport; 134 void TiledBackingStore::adjustVisibleRect() 135 { 136 IntRect visibleRect = mapFromContents(m_client->tiledBackingStoreVisibleRect()); 137 if (m_previousVisibleRect == visibleRect) 138 return; 139 m_previousVisibleRect = visibleRect; 141 140 142 141 startTileCreationTimer(); … … 180 179 if (m_contentsFrozen) 181 180 return; 182 183 if (m_viewport.isEmpty()) 181 182 IntRect visibleRect = mapFromContents(m_client->tiledBackingStoreVisibleRect()); 183 m_previousVisibleRect = visibleRect; 184 185 if (visibleRect.isEmpty()) 184 186 return; 185 187 … … 188 190 189 191 // FIXME: Make configurable/adapt to memory. 190 IntRect keepRect = m_viewport;191 keepRect.inflateX( m_viewport.width());192 keepRect.inflateY(3 * m_viewport.height());192 IntRect keepRect = visibleRect; 193 keepRect.inflateX(visibleRect.width()); 194 keepRect.inflateY(3 * visibleRect.height()); 193 195 keepRect.intersect(contentsRect()); 194 196 195 197 dropTilesOutsideRect(keepRect); 196 198 197 IntRect coverRect = m_viewport;198 coverRect.inflateX( m_viewport.width() / 2);199 coverRect.inflateY(2 * m_viewport.height());199 IntRect coverRect = visibleRect; 200 coverRect.inflateX(visibleRect.width() / 2); 201 coverRect.inflateY(2 * visibleRect.height()); 200 202 coverRect.intersect(contentsRect()); 201 203 … … 214 216 ++requiredTileCount; 215 217 // Distance is 0 for all currently visible tiles. 216 double distance = tileDistance( m_viewport, currentCoordinate);218 double distance = tileDistance(visibleRect, currentCoordinate); 217 219 if (distance > shortestDistance) 218 220 continue; -
trunk/WebCore/platform/graphics/TiledBackingStore.h
r56184 r59611 42 42 ~TiledBackingStore(); 43 43 44 void viewportChanged(const IntRect& viewportRect);44 void adjustVisibleRect(); 45 45 46 46 float contentsScale() { return m_contentsScale; } … … 96 96 IntSize m_tileSize; 97 97 98 IntRect m_ viewport;98 IntRect m_previousVisibleRect; 99 99 float m_contentsScale; 100 100 float m_pendingScale; -
trunk/WebCore/platform/graphics/TiledBackingStoreClient.h
r55976 r59611 30 30 virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea) = 0; 31 31 virtual IntRect tiledBackingStoreContentsRect() = 0; 32 virtual IntRect tiledBackingStoreVisibleRect() = 0; 32 33 }; 33 34 -
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r59539 r59611 61 61 62 62 void updateResizesToContentsForPage(); 63 QRectF graphicsItemVisibleRect() const; 63 virtual QRectF graphicsItemVisibleRect() const; 64 64 65 65 66 void detachCurrentPage(); … … 312 313 if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) { 313 314 // FIXME: We should set the backing store viewport earlier than in paint 314 if (d->resizesToContents) 315 backingStore->viewportChanged(WebCore::IntRect(d->graphicsItemVisibleRect())); 316 else { 317 QRectF visibleRect(d->page->mainFrame()->scrollPosition(), d->page->mainFrame()->geometry().size()); 318 backingStore->viewportChanged(WebCore::IntRect(visibleRect)); 319 } 315 backingStore->adjustVisibleRect(); 320 316 // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change. 321 317 WebCore::GraphicsContext context(painter); -
trunk/WebKit/qt/ChangeLog
r59580 r59611 1 2010-05-17 Antti Koivisto <koivisto@iki.fi> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 https://bugs.webkit.org/show_bug.cgi?id=39218 6 [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation 7 8 Tiles sometimes flicker when exiting a zoom animation. This happens as a result 9 of the visible rectangle being momentarily out of sync. 10 11 Instead of updating the visible rect by explicitly setting it, pull it through 12 the client and recompute in WebKit the level. 13 14 * Api/qgraphicswebview.cpp: 15 (QGraphicsWebView::paint): 16 * WebCoreSupport/ChromeClientQt.cpp: 17 (WebCore::ChromeClientQt::visibleRectForTiledBackingStore): 18 * WebCoreSupport/ChromeClientQt.h: 19 1 20 2010-05-16 Robert Hogan <robert@webkit.org> 2 21 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r59033 r59611 568 568 569 569 #endif 570 571 #if ENABLE(TILED_BACKING_STORE) 572 IntRect ChromeClientQt::visibleRectForTiledBackingStore() const 573 { 574 if (!platformPageClient()) 575 return IntRect(); 576 return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect())); 577 } 578 #endif 570 579 571 580 QtAbstractWebPopup* ChromeClientQt::createSelectPopup() -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r59033 r59611 146 146 #endif 147 147 148 #if ENABLE(TILED_BACKING_STORE) 149 virtual IntRect visibleRectForTiledBackingStore() const; 150 #endif 151 148 152 #if ENABLE(TOUCH_EVENTS) 149 153 virtual void needTouchEvents(bool) { }
Note: See TracChangeset
for help on using the changeset viewer.