Title: [109219] trunk/Source/WebCore
- Revision
- 109219
- Author
- [email protected]
- Date
- 2012-02-29 08:51:41 -0800 (Wed, 29 Feb 2012)
Log Message
Do not iterate all tiles for resizing when the content didn't change
https://bugs.webkit.org/show_bug.cgi?id=79787
Reviewed by Simon Hausmann.
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::createTiles):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109218 => 109219)
--- trunk/Source/WebCore/ChangeLog 2012-02-29 16:43:31 UTC (rev 109218)
+++ trunk/Source/WebCore/ChangeLog 2012-02-29 16:51:41 UTC (rev 109219)
@@ -1,3 +1,13 @@
+2012-02-28 Kenneth Rohde Christiansen <[email protected]>
+
+ Do not iterate all tiles for resizing when the content didn't change
+ https://bugs.webkit.org/show_bug.cgi?id=79787
+
+ Reviewed by Simon Hausmann.
+
+ * platform/graphics/TiledBackingStore.cpp:
+ (WebCore::TiledBackingStore::createTiles):
+
2012-02-29 Parag Radke <[email protected]>
Crash in WebCore::CompositeEditCommand::insertNodeAt
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp (109218 => 109219)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2012-02-29 16:43:31 UTC (rev 109218)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.cpp 2012-02-29 16:51:41 UTC (rev 109219)
@@ -232,22 +232,28 @@
{
if (m_contentsFrozen)
return;
-
- IntRect visibleRect = visibleContentsRect();
+
+ const IntRect visibleRect = visibleContentsRect();
m_previousVisibleRect = visibleRect;
if (visibleRect.isEmpty())
return;
// Resize tiles on edges in case the contents size has changed.
- bool didResizeTiles = resizeEdgeTiles();
+ bool didResizeTiles = false;
+ const IntSize contentsSize = contentsRect().size();
+ if (contentsSize != m_previousContentsSize) {
+ m_previousContentsSize = contentsSize;
+ didResizeTiles = resizeEdgeTiles();
+ }
+
IntRect keepRect;
IntRect coverRect;
computeCoverAndKeepRect(visibleRect, coverRect, keepRect);
dropTilesOutsideRect(keepRect);
-
+
// Search for the tile position closest to the viewport center that does not yet contain a tile.
// Which position is considered the closest depends on the tileDistance function.
double shortestDistance = std::numeric_limits<double>::infinity();
Modified: trunk/Source/WebCore/platform/graphics/TiledBackingStore.h (109218 => 109219)
--- trunk/Source/WebCore/platform/graphics/TiledBackingStore.h 2012-02-29 16:43:31 UTC (rev 109218)
+++ trunk/Source/WebCore/platform/graphics/TiledBackingStore.h 2012-02-29 16:51:41 UTC (rev 109219)
@@ -121,8 +121,10 @@
double m_tileCreationDelay;
float m_coverAreaMultiplier;
FloatPoint m_visibleRectTrajectoryVector;
-
+
IntRect m_previousVisibleRect;
+ IntSize m_previousContentsSize;
+
float m_contentsScale;
float m_pendingScale;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes