Changeset 271135 in webkit
- Timestamp:
- Jan 4, 2021 10:13:53 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r271134 r271135 1 2020-12-31 Simon Fraser <simon.fraser@apple.com> 2 3 [LFC Display] Hook up very basic repaint in the display tree 4 https://bugs.webkit.org/show_bug.cgi?id=220212 5 6 Reviewed by Zalan Bujtas. 7 8 Plumb setNeedsDisplay() from a Display::Box via the Tree to the View, and from there 9 just repaint the entire root layer. This is very preliminary. 10 11 * display/DisplayTree.cpp: 12 (WebCore::Display::Tree::setBoxNeedsDisplay const): 13 * display/DisplayTree.h: 14 * display/DisplayView.cpp: 15 (WebCore::Display::View::prepareForDisplay): 16 (WebCore::Display::View::setNeedsDisplay): 17 * display/DisplayView.h: 18 * display/compositing/DisplayLayerController.cpp: 19 (WebCore::Display::LayerController::setNeedsDisplay): 20 * display/compositing/DisplayLayerController.h: 21 * display/css/DisplayBox.cpp: 22 (WebCore::Display::Box::Box): 23 (WebCore::Display::Box::setNeedsDisplay): 24 * display/css/DisplayBox.h: 25 1 26 2020-12-31 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/display/DisplayTree.cpp
r271133 r271135 50 50 } 51 51 52 void Tree::setBoxNeedsDisplay(Box&, Optional<AbsoluteFloatRect>) const 53 { 54 // FIXME: For now, just repaint the world. 55 if (m_view) 56 m_view->setNeedsDisplay(); 57 } 58 52 59 } // namespace Display 53 60 } // namespace WebCore -
trunk/Source/WebCore/display/DisplayTree.h
r271133 r271135 28 28 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 29 29 30 #include "FloatRect.h" 30 31 #include <wtf/IsoMalloc.h> 31 32 … … 33 34 namespace Display { 34 35 36 class Box; 35 37 class ContainerBox; 36 38 class StackingItem; 37 39 class View; 40 41 using AbsoluteFloatRect = FloatRect; 38 42 39 43 class Tree { … … 50 54 const ContainerBox& rootBox() const; 51 55 56 void setBoxNeedsDisplay(Box&, Optional<AbsoluteFloatRect> subrect = WTF::nullopt) const; 57 52 58 private: 53 59 void setRootStackingItem(std::unique_ptr<StackingItem>&&); -
trunk/Source/WebCore/display/DisplayView.cpp
r270809 r271135 80 80 auto treeBuilder = TreeBuilder { deviceScaleFactor() }; 81 81 m_displayTree = treeBuilder.build(*layoutState); 82 m_displayTree->setView(this); 82 83 83 84 m_layerController.prepareForDisplay(*m_displayTree); … … 87 88 { 88 89 m_layerController.flushLayers(); 90 } 91 92 void View::setNeedsDisplay() 93 { 94 m_layerController.setNeedsDisplay(); 89 95 } 90 96 -
trunk/Source/WebCore/display/DisplayView.h
r270752 r271135 63 63 Frame& frame() const; 64 64 65 // FIXME: Temporary. 66 void setNeedsDisplay(); 67 65 68 float deviceScaleFactor() const; 66 69 -
trunk/Source/WebCore/display/compositing/DisplayLayerController.cpp
r270752 r271135 106 106 } 107 107 108 void LayerController::setNeedsDisplay() 109 { 110 m_contentLayer->setNeedsDisplay(); 111 } 112 108 113 void LayerController::flushLayers() 109 114 { -
trunk/Source/WebCore/display/compositing/DisplayLayerController.h
r270752 r271135 53 53 void setIsInWindow(bool); 54 54 55 // FIXME: Temporary. 56 void setNeedsDisplay(); 57 55 58 const View& view() const { return m_view; } 56 59 -
trunk/Source/WebCore/display/css/DisplayBox.cpp
r271133 r271135 44 44 , m_typeFlags(flags) 45 45 { 46 UNUSED_PARAM(m_tree);47 46 } 48 47 … … 57 56 { 58 57 return !isLineBreakBox() && style().participatesInZOrderSorting(); 58 } 59 60 void Box::setNeedsDisplay(Optional<AbsoluteFloatRect> subrect) 61 { 62 m_tree.setBoxNeedsDisplay(*this, subrect); 59 63 } 60 64 -
trunk/Source/WebCore/display/css/DisplayBox.h
r271134 r271135 77 77 void setNextSibling(std::unique_ptr<Box>&&); 78 78 79 void setNeedsDisplay(Optional<AbsoluteFloatRect> subrect = WTF::nullopt); 80 79 81 virtual String debugDescription() const; 80 82
Note: See TracChangeset
for help on using the changeset viewer.