Changeset 199038 in webkit
- Timestamp:
- Apr 4, 2016 9:04:35 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r199037 r199038 1 2016-04-04 Simon Fraser <simon.fraser@apple.com> 2 3 Make FrameView's exposedRect an Optional<> 4 https://bugs.webkit.org/show_bug.cgi?id=156189 5 6 Reviewed by Tim Horton. 7 8 Instead of testing against isInfinite(), make FrameView::exposedRect() and the 9 member variable an Optional<FloatRect>. 10 11 * page/FrameView.cpp: 12 (WebCore::FrameView::setExposedRect): 13 * page/FrameView.h: 14 * rendering/RenderLayerBacking.cpp: 15 (WebCore::computeTileCoverage): 16 * rendering/RenderLayerCompositor.cpp: 17 (WebCore::RenderLayerCompositor::flushPendingLayerChanges): 18 1 19 2016-04-04 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebCore/page/FrameView.cpp
r198841 r199038 208 208 , m_isTrackingRepaints(false) 209 209 , m_shouldUpdateWhileOffscreen(true) 210 , m_exposedRect(FloatRect::infiniteRect())211 210 , m_deferSetNeedsLayoutCount(0) 212 211 , m_setNeedsLayoutWasDeferred(false) … … 4911 4910 void FrameView::setExposedRect(FloatRect exposedRect) 4912 4911 { 4913 if (m_exposedRect == exposedRect) 4914 return; 4912 if (m_exposedRect && m_exposedRect.value() == exposedRect) 4913 return; 4914 4915 4915 m_exposedRect = exposedRect; 4916 4916 -
trunk/Source/WebCore/page/FrameView.h
r198841 r199038 544 544 // internal to WebCore and doesn't respect those things. 545 545 WEBCORE_EXPORT void setExposedRect(FloatRect); 546 FloatRectexposedRect() const { return m_exposedRect; }546 Optional<FloatRect> exposedRect() const { return m_exposedRect; } 547 547 548 548 #if ENABLE(CSS_SCROLL_SNAP) … … 755 755 bool m_shouldUpdateWhileOffscreen; 756 756 757 FloatRectm_exposedRect;757 Optional<FloatRect> m_exposedRect; 758 758 759 759 unsigned m_deferSetNeedsLayoutCount; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r198374 r199038 227 227 bool useMinimalTilesDuringLiveResize = frameView.inLiveResize(); 228 228 if (frameView.speculativeTilingEnabled() && !useMinimalTilesDuringLiveResize) { 229 bool clipsToExposedRect = !frameView.exposedRect().isInfinite();229 bool clipsToExposedRect = static_cast<bool>(frameView.exposedRect()); 230 230 if (frameView.horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect) 231 231 tileCoverage |= TiledBacking::CoverageForHorizontalScrolling; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r198841 r199038 60 60 #include "ScrollingCoordinator.h" 61 61 #include "Settings.h" 62 #include "TextStream.h" 62 63 #include "TiledBacking.h" 63 64 #include "TransformState.h" … … 459 460 #else 460 461 // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers. 461 IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect();462 if (!frameView.exposedRect().isInfinite()) 463 visibleRect.intersect(IntRect(frameView.exposedRect()));464 465 LOG(Compositing, "RenderLayerCompositor %p flushPendingLayerChanges(%d) %d, %d, %dx%d (stable viewport %d)", this, isFlushRoot, 466 visibleRect.x(), visibleRect.y(), visibleRect.width(), visibleRect.height(), frameView.viewportIsStable());462 FloatRect visibleRect = m_clipLayer ? FloatRect({ 0, 0 }, frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect(); 463 464 if (frameView.exposedRect()) 465 visibleRect.intersect(frameView.exposedRect().value()); 466 467 LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor " << this << " flushPendingLayerChanges(" << isFlushRoot << ") " << visibleRect << " (stable viewport " << frameView.viewportIsStable() << ")"); 467 468 rootLayer->flushCompositingState(visibleRect, frameView.viewportIsStable()); 468 469 #endif
Note: See TracChangeset
for help on using the changeset viewer.