Changeset 136774 in webkit
- Timestamp:
- Dec 5, 2012, 4:07:02 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136773 r136774 1 2012-12-05 Simon Fraser <simon.fraser@apple.com> 2 3 Fix some repaint/paintCounter confusion, and reset it when getting layers out of the layer pool 4 https://bugs.webkit.org/show_bug.cgi?id=104180 5 6 Reviewed by Tim Horton. 7 8 Layers retrieved from the LayerPool by TileCache need to have their 9 repaint counters reset, otherwise the scroll performance logging gets 10 confused. 11 12 Also, the counter counts paints, not repaints (invalidations), so 13 rename it accordingly. 14 15 * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: 16 (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Whitespace fix. 17 * platform/graphics/GraphicsLayer.h: 18 * platform/graphics/ca/mac/TileCache.mm: 19 (WebCore::TileCache::blankPixelCountForTiles): 20 (WebCore::TileCache::createTileLayer): 21 (WebCore::TileCache::drawRepaintCounter): 22 * platform/graphics/ca/mac/WebTileLayer.h: 23 * platform/graphics/ca/mac/WebTileLayer.mm: 24 (-[WebTileLayer resetPaintCount]): 25 (-[WebTileLayer incrementPaintCount]): 26 (-[WebTileLayer paintCount]): 27 (-[WebTileLayer logFilledFreshTile]): 28 1 29 2012-12-05 Oliver Hunt <oliver@apple.com> 2 30 -
trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
r134169 r136774 331 331 WebTileLayerList tiles; 332 332 333 while (!layerQueue.isEmpty() && tiles.isEmpty()) {333 while (!layerQueue.isEmpty() && tiles.isEmpty()) { 334 334 CALayer* layer = layerQueue.takeFirst(); 335 335 NSArray* sublayers = [[layer sublayers] copy]; -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r134628 r136774 373 373 bool isShowingRepaintCounter() const { return m_showRepaintCounter; } 374 374 375 // FIXME: this is really a paint count. 375 376 int repaintCount() const { return m_repaintCount; } 376 377 int incrementRepaintCount() { return ++m_repaintCount; } -
trunk/Source/WebCore/platform/graphics/ca/mac/TileCache.mm
r136594 r136774 411 411 visiblePart.intersect(visibleRect); 412 412 413 if (!visiblePart.isEmpty() && [tileLayer repaintCount])413 if (!visiblePart.isEmpty() && [tileLayer paintCount]) 414 414 paintedVisibleTiles.unite(visiblePart); 415 415 } … … 602 602 // If we were able to restore a layer from the LayerPool, we should call setNeedsDisplay to 603 603 // ensure we avoid stale content. 604 [layer resetPaintCount]; 604 605 [layer setNeedsDisplay]; 605 606 } else … … 640 641 void TileCache::drawRepaintCounter(WebTileLayer *layer, CGContextRef context) 641 642 { 642 unsigned repaintCount = [layer incrementRepaintCount];643 unsigned paintCount = [layer incrementPaintCount]; 643 644 if (!shouldShowRepaintCounters()) 644 645 return; … … 646 647 // FIXME: Some of this code could be shared with WebLayer. 647 648 char text[16]; // that's a lot of repaints 648 snprintf(text, sizeof(text), "%d", repaintCount);649 snprintf(text, sizeof(text), "%d", paintCount); 649 650 650 651 CGRect indicatorBox = [layer bounds]; -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.h
r125156 r136774 33 33 @interface WebTileLayer : CALayer { 34 34 WebCore::TileCache* _tileCache; 35 unsigned _ repaintCount;35 unsigned _paintCount; 36 36 } 37 37 38 38 - (void)setTileCache:(WebCore::TileCache*)tileCache; 39 - (unsigned)incrementRepaintCount; 40 - (unsigned)repaintCount; 39 - (void)resetPaintCount; 40 - (unsigned)incrementPaintCount; 41 - (unsigned)paintCount; 41 42 @end 42 43 -
trunk/Source/WebCore/platform/graphics/ca/mac/WebTileLayer.mm
r130224 r136774 62 62 } 63 63 64 - ( unsigned)incrementRepaintCount64 - (void)resetPaintCount 65 65 { 66 return ++_repaintCount;66 _paintCount = 0; 67 67 } 68 68 69 - (unsigned) repaintCount69 - (unsigned)incrementPaintCount 70 70 { 71 return _repaintCount; 71 return ++_paintCount; 72 } 73 74 - (unsigned)paintCount 75 { 76 return _paintCount; 72 77 } 73 78 … … 77 82 visiblePart.intersect(_tileCache->visibleRect()); 78 83 79 if ([self repaintCount] == 1 && !visiblePart.isEmpty())84 if ([self paintCount] == 1 && !visiblePart.isEmpty()) 80 85 WTFLogAlways("SCROLLING: Filled visible fresh tile. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), _tileCache->blankPixelCount()); 81 86 }
Note:
See TracChangeset
for help on using the changeset viewer.