Changeset 213466 in webkit
- Timestamp:
- Mar 6, 2017, 1:45:38 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 15 added
- 18 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style.html (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-configs.html (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt (modified) (3 diffs)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled.html (modified) (6 diffs)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-images-expected.txt (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-images.html (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt (added)
-
LayoutTests/compositing/contents-format/subpixel-antialiased-text-visibility.html (added)
-
LayoutTests/compositing/resources/circle-with-text.svg (added)
-
LayoutTests/compositing/resources/circle.svg (added)
-
LayoutTests/platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt (modified) (3 diffs)
-
LayoutTests/platform/mac/compositing/contents-format (added)
-
LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt (added)
-
LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt (added)
-
LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt (copied) (copied from trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt ) (3 diffs)
-
LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt (added)
-
LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsLayer.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsLayer.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderImage.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RenderImage.h (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (6 diffs)
-
Source/WebCore/rendering/RenderLayer.h (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerBacking.cpp (modified) (21 diffs)
-
Source/WebCore/rendering/RenderLayerBacking.h (modified) (6 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (1 diff)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r213464 r213466 1 2017-03-06 Simon Fraser <simon.fraser@apple.com> 2 3 Only use layer backing store which supports subpixel antialiased text if we know subpixel antialiased will be painted into it 4 https://bugs.webkit.org/show_bug.cgi?id=169191 5 6 Reviewed by Zalan Bujtas. 7 8 Test lots of layer configs for subpixel antialiased text support. Only Mac results show the 9 "(supports subpixel antialiased text 1)" flag on layers now, since the patch makes this 10 dependent on platform support. 11 12 * compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Added. 13 * compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style.html: Added. 14 * compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Added. 15 * compositing/contents-format/subpixel-antialiased-text-configs.html: Added. 16 * compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: 17 * compositing/contents-format/subpixel-antialiased-text-enabled.html: 18 * compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Added. 19 * compositing/contents-format/subpixel-antialiased-text-images.html: Added. 20 * compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Added. 21 * compositing/contents-format/subpixel-antialiased-text-visibility.html: Added. 22 * compositing/resources/circle-with-text.svg: Added. 23 * compositing/resources/circle.svg: Added. 24 * platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: 25 * platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style-expected.txt: Added. 26 * platform/mac/compositing/contents-format/subpixel-antialiased-text-configs-expected.txt: Added. 27 * platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt: Copied from LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt. 28 * platform/mac/compositing/contents-format/subpixel-antialiased-text-images-expected.txt: Added. 29 * platform/mac/compositing/contents-format/subpixel-antialiased-text-visibility-expected.txt: Added. 30 1 31 2017-03-06 Myles C. Maxfield <mmaxfield@apple.com> 2 32 -
trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt
r212776 r213466 1 1 Normal layer 2 2 Tiled layer 3 Become-tiled layer 3 4 (GraphicsLayer 4 5 (anchor 0.00 0.00) … … 8 9 (bounds 5018.00 2018.00) 9 10 (contentsOpaque 1) 10 (supports subpixel antialiased text 1)11 11 (tile cache coverage 0, 0 1024 x 1024) 12 12 (tile size 512 x 512) 13 13 (top left tile 0, 0 tiles grid 2 x 2) 14 14 (in window 1) 15 (children 215 (children 3 16 16 (GraphicsLayer 17 17 (position 18.00 10.00) 18 18 (bounds 100.00 100.00) 19 (contentsOpaque 1)20 (supports subpixel antialiased text 1)21 19 (drawsContent 1) 22 20 ) … … 25 23 (bounds 5000.00 100.00) 26 24 (usingTiledLayer 1) 27 (contentsOpaque 1) 28 (supports subpixel antialiased text 1) 25 (drawsContent 1) 26 (tile cache coverage 0, 0 1024 x 100) 27 (tile size 512 x 512) 28 (top left tile 0, 0 tiles grid 2 x 1) 29 (in window 1) 30 ) 31 (GraphicsLayer 32 (position 18.00 230.00) 33 (bounds 5000.00 100.00) 34 (usingTiledLayer 1) 29 35 (drawsContent 1) 30 36 (tile cache coverage 0, 0 1024 x 100) -
trunk/LayoutTests/compositing/contents-format/subpixel-antialiased-text-enabled.html
r212776 r213466 6 6 body { 7 7 height: 2000px; 8 -webkit-font-smoothing: subpixel-antialiased; 8 9 } 9 10 … … 11 12 height: 100px; 12 13 width: 100px; 13 background-color: blue;14 background-color: rgba(0, 0, 128, 0.6); 14 15 margin: 10px; 15 16 } … … 17 18 .composited { 18 19 transform: translateZ(0); 20 } 21 22 p { 23 line-height: 20px; 19 24 } 20 25 … … 31 36 function doAfterReload() 32 37 { 33 if (window.internals) 34 document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES); 38 setTimeout(function() { 39 document.getElementById('become-tiled').classList.add('tiled'); 40 setTimeout(function() { 41 if (window.internals) 42 document.getElementById('layers').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_TILE_CACHES); 35 43 36 delete window.localStorage.stage;44 delete window.localStorage.stage; 37 45 38 if (window.testRunner) 39 testRunner.notifyDone(); 46 if (window.testRunner) 47 testRunner.notifyDone(); 48 }, 0); 49 }, 0); 40 50 } 41 51 … … 43 53 { 44 54 window.localStorage.stage = 1; 45 if (window.internals) 55 if (window.internals) { 56 internals.setFontSmoothingEnabled(true); 46 57 internals.settings.setSubpixelAntialiasedLayerTextEnabled(true) 58 } 47 59 48 60 // Reload so that the setting affects page tiles. … … 70 82 </div> 71 83 84 <div id="become-tiled" class="composited box"> 85 Become-tiled layer 86 </div> 87 72 88 <pre id="layers"></pre> 73 89 </body> -
trunk/LayoutTests/platform/mac-wk1/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt
r212776 r213466 1 1 Normal layer 2 2 Tiled layer 3 Become-tiled layer 3 4 (GraphicsLayer 4 5 (anchor 0.00 0.00) … … 8 9 (bounds 5018.00 2018.00) 9 10 (contentsOpaque 1) 10 (supports subpixel antialiased text 1) 11 (children 2 11 (children 3 12 12 (GraphicsLayer 13 13 (position 18.00 10.00) 14 14 (bounds 100.00 100.00) 15 (contentsOpaque 1)16 15 (supports subpixel antialiased text 1) 17 16 (drawsContent 1) … … 21 20 (bounds 5000.00 100.00) 22 21 (usingTiledLayer 1) 23 (contentsOpaque 1) 22 (supports subpixel antialiased text 1) 23 (drawsContent 1) 24 (tile cache coverage 0, 0 1024 x 100) 25 (tile size 512 x 512) 26 (top left tile 0, 0 tiles grid 2 x 1) 27 (in window 1) 28 ) 29 (GraphicsLayer 30 (position 18.00 230.00) 31 (bounds 5000.00 100.00) 32 (usingTiledLayer 1) 24 33 (supports subpixel antialiased text 1) 25 34 (drawsContent 1) -
trunk/LayoutTests/platform/mac/compositing/contents-format/subpixel-antialiased-text-enabled-expected.txt
r213465 r213466 1 1 Normal layer 2 2 Tiled layer 3 Become-tiled layer 3 4 (GraphicsLayer 4 5 (anchor 0.00 0.00) … … 8 9 (bounds 5018.00 2018.00) 9 10 (contentsOpaque 1) 10 (supports subpixel antialiased text 1)11 11 (tile cache coverage 0, 0 1024 x 1024) 12 12 (tile size 512 x 512) 13 13 (top left tile 0, 0 tiles grid 2 x 2) 14 14 (in window 1) 15 (children 215 (children 3 16 16 (GraphicsLayer 17 17 (position 18.00 10.00) 18 18 (bounds 100.00 100.00) 19 (contentsOpaque 1)20 19 (supports subpixel antialiased text 1) 21 20 (drawsContent 1) … … 25 24 (bounds 5000.00 100.00) 26 25 (usingTiledLayer 1) 27 (contentsOpaque 1) 26 (supports subpixel antialiased text 1) 27 (drawsContent 1) 28 (tile cache coverage 0, 0 1024 x 100) 29 (tile size 512 x 512) 30 (top left tile 0, 0 tiles grid 2 x 1) 31 (in window 1) 32 ) 33 (GraphicsLayer 34 (position 18.00 230.00) 35 (bounds 5000.00 100.00) 36 (usingTiledLayer 1) 28 37 (supports subpixel antialiased text 1) 29 38 (drawsContent 1) -
trunk/Source/WebCore/ChangeLog
r213464 r213466 1 2017-03-06 Simon Fraser <simon.fraser@apple.com> 2 3 Only use layer backing store which supports subpixel antialiased text if we know subpixel antialiased will be painted into it 4 https://bugs.webkit.org/show_bug.cgi?id=169191 5 6 Reviewed by Zalan Bujtas. 7 8 Instead of unconditionally calling setSupportsSubpixelAntialiasedText() on GraphicsLayers created 9 by RenderLayerBacking, only do so when we know (or suspect) that a layer contains smoothed text. 10 11 This is done by enhancing RenderLayer::isVisuallyNonEmpty() and RenderLayer::hasNonEmptyChildRenderers() 12 to take a PaintedContentRequest parameter, which allows the caller to specify what qualities of 13 the layer contents it is interested in. Most of the time, this is just any painted content, but on 14 platforms where GraphicsLayer::supportsSubpixelAntialiasedLayerText() returns true, the query also 15 asks about whether the layer will contain subpixel-antialiased text. In this case, it can't early 16 return as soon as painted content is found; it must keep iterating renderers while all the query 17 requests are unsatisfied, or until it hits depth or sibling limits. If a limit is hit, we take the 18 same path of assuming there is subpixel-antialiased text (via the "Undetermined" state). 19 20 RenderLayerBacking also makes use of PaintedContentRequest during its non-composited child layer walk. 21 22 To offset the additional cost of this tree walking, RenderLayerBacking now caches information about its 23 painted content for the duration of a single update via PaintedContentsInfo, so we no longer call 24 isDirectlyCompositedImage() and isSimpleContainerCompositingLayer() multiple times per backing per update. 25 The traversal code here too now has to continue until all necessary states in the request have been computed. 26 27 Add some functions to RenderImage so that we know if it's showing the alt text or has a non-bitmap image 28 (which may contain text). 29 30 Subpixel-antialiased ("smoothed") text is disabled by DRT and WTR by default, so we need Internals API to enable it. 31 32 Platforms now express their support for subpixel-antialiased text via GraphicsLayer::supportsSubpixelAntialiasedLayerText() 33 which only returns true on Mac. 34 35 Tests: compositing/contents-format/subpixel-antialiased-text-configs-antialiasing-style.html 36 compositing/contents-format/subpixel-antialiased-text-configs.html 37 compositing/contents-format/subpixel-antialiased-text-images.html 38 compositing/contents-format/subpixel-antialiased-text-visibility.html 39 40 * platform/graphics/GraphicsLayer.cpp: 41 (WebCore::GraphicsLayer::supportsSubpixelAntialiasedLayerText): 42 * platform/graphics/GraphicsLayer.h: 43 * platform/graphics/ca/GraphicsLayerCA.cpp: 44 (WebCore::GraphicsLayer::supportsSubpixelAntialiasedLayerText): 45 (WebCore::GraphicsLayerCA::changeLayerTypeTo): 46 * rendering/RenderImage.cpp: 47 (WebCore::RenderImage::isShowingMissingOrImageError): 48 (WebCore::RenderImage::isShowingAltText): 49 (WebCore::RenderImage::hasNonBitmapImage): 50 * rendering/RenderImage.h: 51 * rendering/RenderLayer.cpp: 52 (WebCore::RenderLayer::calculateClipRects): 53 * rendering/RenderLayer.h: 54 * rendering/RenderLayerBacking.cpp: 55 (WebCore::PaintedContentsInfo::PaintedContentsInfo): 56 (WebCore::PaintedContentsInfo::setWantsSubpixelAntialiasedTextState): 57 (WebCore::PaintedContentsInfo::paintsBoxDecorations): 58 (WebCore::PaintedContentsInfo::paintsContent): 59 (WebCore::PaintedContentsInfo::paintsSubpixelAntialiasedText): 60 (WebCore::PaintedContentsInfo::isSimpleContainer): 61 (WebCore::PaintedContentsInfo::isDirectlyCompositedImage): 62 (WebCore::PaintedContentsInfo::paintsBoxDecorationsDetermination): 63 (WebCore::PaintedContentsInfo::paintsContentDetermination): 64 (WebCore::PaintedContentsInfo::paintsSubpixelAntialiasedTextDetermination): 65 (WebCore::PaintedContentsInfo::contentsTypeDetermination): 66 (WebCore::RenderLayerBacking::createGraphicsLayer): 67 (WebCore::RenderLayerBacking::updateConfiguration): 68 (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect): 69 (WebCore::RenderLayerBacking::updateAfterDescendants): 70 (WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations): 71 (WebCore::RenderLayerBacking::updateDrawsContent): 72 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): 73 (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): 74 (WebCore::RenderLayerBacking::paintsContent): 75 (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): 76 (WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers): 77 (WebCore::RenderLayerBacking::hasVisibleNonCompositedDescendants): 78 (WebCore::RenderLayerBacking::containsPaintedContent): 79 (WebCore::RenderLayerBacking::contentChanged): 80 (WebCore::RenderLayerBacking::updateImageContents): 81 (WebCore::RenderLayerBacking::paintsChildRenderers): Deleted. 82 * rendering/RenderLayerBacking.h: 83 * rendering/RenderLayerCompositor.cpp: 84 (WebCore::RenderLayerCompositor::logLayerInfo): 85 * testing/Internals.cpp: 86 (WebCore::Internals::setFontSmoothingEnabled): 87 * testing/Internals.h: 88 * testing/Internals.idl: 89 1 90 2017-03-06 Myles C. Maxfield <mmaxfield@apple.com> 2 91 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r212776 r213466 95 95 return false; 96 96 #endif 97 } 98 99 bool GraphicsLayer::supportsSubpixelAntialiasedLayerText() 100 { 101 return false; 97 102 } 98 103 #endif -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r212776 r213466 555 555 static bool supportsLayerType(Type); 556 556 static bool supportsContentsTiling(); 557 static bool supportsSubpixelAntialiasedLayerText(); 557 558 558 559 void updateDebugIndicators(); -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r212941 r213466 318 318 } 319 319 320 bool GraphicsLayer::supportsSubpixelAntialiasedLayerText() 321 { 322 #if PLATFORM(MAC) 323 return true; 324 #else 325 return false; 326 #endif 327 } 328 320 329 std::unique_ptr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerFactory* factory, GraphicsLayerClient& client, Type layerType) 321 330 { … … 3617 3626 | ContentsScaleChanged 3618 3627 | AcceleratesDrawingChanged 3628 | SupportsSubpixelAntialiasedTextChanged 3619 3629 | FiltersChanged 3620 3630 | BackdropFiltersChanged -
trunk/Source/WebCore/rendering/RenderImage.cpp
r213404 r213466 350 350 } 351 351 352 bool RenderImage::isShowingMissingOrImageError() const 353 { 354 return !imageResource().hasImage() || imageResource().errorOccurred(); 355 } 356 357 bool RenderImage::isShowingAltText() const 358 { 359 return isShowingMissingOrImageError() && !m_altText.isEmpty(); 360 } 361 362 bool RenderImage::hasNonBitmapImage() const 363 { 364 if (!imageResource().hasImage()) 365 return false; 366 367 Image* image = cachedImage()->imageForRenderer(this); 368 return image && !is<BitmapImage>(image); 369 } 370 352 371 void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 353 372 { -
trunk/Source/WebCore/rendering/RenderImage.h
r206903 r213466 70 70 71 71 void setHasShadowControls(bool hasShadowControls) { m_hasShadowControls = hasShadowControls; } 72 73 bool isShowingMissingOrImageError() const; 74 bool isShowingAltText() const; 75 76 bool hasNonBitmapImage() const; 72 77 73 78 protected: -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r213440 r213466 90 90 #include "RenderFlowThread.h" 91 91 #include "RenderGeometryMap.h" 92 #include "RenderImage.h" 92 93 #include "RenderInline.h" 93 94 #include "RenderIterator.h" … … 6580 6581 } 6581 6582 6583 static bool styleHasSmoothingTextMode(const RenderStyle& style) 6584 { 6585 FontSmoothingMode smoothingMode = style.fontDescription().fontSmoothing(); 6586 return smoothingMode == AutoSmoothing || smoothingMode == SubpixelAntialiased; 6587 } 6588 6582 6589 // Constrain the depth and breadth of the search for performance. 6583 6590 static const int maxDescendentDepth = 3; 6584 6591 static const int maxSiblingCount = 20; 6585 6592 6586 static bool hasPaintingNonLayerDescendants(const RenderElement& renderer, int depth) 6587 { 6588 if (depth > maxDescendentDepth) 6589 return true; 6593 static void determineNonLayerDescendantsPaintedContent(const RenderElement& renderer, int depth, RenderLayer::PaintedContentRequest& request) 6594 { 6595 if (depth > maxDescendentDepth) { 6596 request.makeStatesUndetermined(); 6597 return; 6598 } 6590 6599 6591 6600 int siblingCount = 0; 6592 6601 for (const auto& child : childrenOfType<RenderObject>(renderer)) { 6593 if (++siblingCount > maxSiblingCount) 6594 return true; 6602 if (++siblingCount > maxSiblingCount) { 6603 request.makeStatesUndetermined(); 6604 return; 6605 } 6595 6606 6596 6607 if (is<RenderText>(child)) { … … 6600 6611 6601 6612 if (renderer.style().userSelect() != SELECT_NONE) 6602 return true; 6603 6604 if (!renderText.text()->containsOnlyWhitespace()) 6605 return true; 6613 request.setHasPaintedContent(); 6614 6615 if (!renderText.text()->containsOnlyWhitespace()) { 6616 request.setHasPaintedContent(); 6617 6618 if (request.needToDetermineSubpixelAntialiasedTextState() && styleHasSmoothingTextMode(child.style())) 6619 request.setHasSubpixelAntialiasedText(); 6620 } 6621 6622 if (request.isSatisfied()) 6623 return; 6606 6624 } 6607 6625 … … 6614 6632 continue; 6615 6633 6616 if (hasVisibleBoxDecorationsOrBackground(renderElementChild)) 6617 return true; 6634 if (hasVisibleBoxDecorationsOrBackground(renderElementChild)) { 6635 request.setHasPaintedContent(); 6636 if (request.isSatisfied()) 6637 return; 6638 } 6618 6639 6619 if (is<RenderReplaced>(renderElementChild)) 6620 return true; 6621 6622 if (hasPaintingNonLayerDescendants(renderElementChild, depth + 1)) 6623 return true; 6624 } 6625 6626 return false; 6627 } 6628 6629 bool RenderLayer::hasNonEmptyChildRenderers() const 6630 { 6631 return hasPaintingNonLayerDescendants(renderer(), 0); 6640 if (is<RenderReplaced>(renderElementChild)) { 6641 request.setHasPaintedContent(); 6642 6643 if (is<RenderImage>(renderElementChild) && request.needToDetermineSubpixelAntialiasedTextState()) { 6644 auto& imageRenderer = downcast<RenderImage>(renderElementChild); 6645 // May draw text if showing alt text, or image is an SVG image or PDF image. 6646 if ((imageRenderer.isShowingAltText() || imageRenderer.hasNonBitmapImage()) && styleHasSmoothingTextMode(child.style())) 6647 request.setHasSubpixelAntialiasedText(); 6648 } 6649 6650 if (request.isSatisfied()) 6651 return; 6652 } 6653 6654 determineNonLayerDescendantsPaintedContent(renderElementChild, depth + 1, request); 6655 if (request.isSatisfied()) 6656 return; 6657 } 6658 } 6659 6660 bool RenderLayer::hasNonEmptyChildRenderers(PaintedContentRequest& request) const 6661 { 6662 determineNonLayerDescendantsPaintedContent(renderer(), 0, request); 6663 return request.probablyHasPaintedContent(); 6632 6664 } 6633 6665 … … 6645 6677 } 6646 6678 6647 bool RenderLayer::isVisuallyNonEmpty( ) const6679 bool RenderLayer::isVisuallyNonEmpty(PaintedContentRequest* request) const 6648 6680 { 6649 6681 ASSERT(!m_visibleDescendantStatusDirty); … … 6652 6684 return false; 6653 6685 6654 if (renderer().isRenderReplaced() || hasOverflowControls()) 6686 if (renderer().isRenderReplaced() || hasOverflowControls()) { 6687 if (request) 6688 request->setHasPaintedContent(); 6655 6689 return true; 6656 6657 if (hasVisibleBoxDecorationsOrBackground()) 6690 } 6691 6692 if (hasVisibleBoxDecorationsOrBackground()) { 6693 if (request) 6694 request->setHasPaintedContent(); 6658 6695 return true; 6659 6660 if (hasNonEmptyChildRenderers()) 6661 return true; 6662 6663 return false; 6696 } 6697 6698 PaintedContentRequest localRequest; 6699 if (!request) 6700 request = &localRequest; 6701 return hasNonEmptyChildRenderers(*request); 6664 6702 } 6665 6703 -
trunk/Source/WebCore/rendering/RenderLayer.h
r210469 r213466 110 110 typedef unsigned LayerScrollCoordinationRoles; 111 111 112 enum class RequestState { 113 Unknown, 114 DontCare, 115 False, 116 True, 117 Undetermined 118 }; 119 112 120 class RenderLayer final : public ScrollableArea { 113 121 WTF_MAKE_FAST_ALLOCATED; … … 389 397 bool hasVisibleBoxDecorationsOrBackground() const; 390 398 bool hasVisibleBoxDecorations() const; 399 400 struct PaintedContentRequest { 401 void makeStatesUndetermined() 402 { 403 if (hasPaintedContent == RequestState::Unknown) 404 hasPaintedContent = RequestState::Undetermined; 405 406 if (hasSubpixelAntialiasedText == RequestState::Unknown) 407 hasSubpixelAntialiasedText = RequestState::Undetermined; 408 } 409 410 void setHasPaintedContent() { hasPaintedContent = RequestState::True; } 411 void setHasSubpixelAntialiasedText() { hasSubpixelAntialiasedText = RequestState::True; } 412 413 bool needToDeterminePaintedContentState() const { return hasPaintedContent == RequestState::Unknown; } 414 bool needToDetermineSubpixelAntialiasedTextState() const { return hasSubpixelAntialiasedText == RequestState::Unknown; } 415 416 bool probablyHasPaintedContent() const { return hasPaintedContent == RequestState::True || hasPaintedContent == RequestState::Undetermined; } 417 bool probablyHasSubpixelAntialiasedText() const { return hasSubpixelAntialiasedText == RequestState::True || hasSubpixelAntialiasedText == RequestState::Undetermined; } 418 419 bool isSatisfied() const { return hasPaintedContent != RequestState::Unknown && hasSubpixelAntialiasedText != RequestState::Unknown; } 420 421 RequestState hasPaintedContent { RequestState::Unknown }; 422 RequestState hasSubpixelAntialiasedText { RequestState::DontCare }; 423 }; 424 391 425 // Returns true if this layer has visible content (ignoring any child layers). 392 bool isVisuallyNonEmpty( ) const;426 bool isVisuallyNonEmpty(PaintedContentRequest* = nullptr) const; 393 427 // True if this layer container renderers that paint. 394 bool hasNonEmptyChildRenderers( ) const;428 bool hasNonEmptyChildRenderers(PaintedContentRequest&) const; 395 429 396 430 // FIXME: We should ASSERT(!m_hasSelfPaintingLayerDescendantDirty); here but we hit the same bugs as visible content above. -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r213435 r213466 92 92 } 93 93 94 // This acts as a cache of what we know about what is painting into this RenderLayerBacking. 95 class PaintedContentsInfo { 96 public: 97 enum class ContentsTypeDetermination { 98 Unknown, 99 SimpleContainer, 100 DirectlyCompositedImage, 101 Painted 102 }; 103 104 PaintedContentsInfo(RenderLayerBacking& inBacking) 105 : m_backing(inBacking) 106 { 107 } 108 109 void setWantsSubpixelAntialiasedTextState(bool wantsSubpixelAntialiasedTextState) 110 { 111 m_subpixelAntialiasedText = wantsSubpixelAntialiasedTextState ? RequestState::Unknown : RequestState::DontCare; 112 } 113 114 RequestState paintsBoxDecorationsDetermination(); 115 bool paintsBoxDecorations() 116 { 117 RequestState state = paintsBoxDecorationsDetermination(); 118 return state == RequestState::True || state == RequestState::Undetermined; 119 } 120 121 RequestState paintsContentDetermination(); 122 bool paintsContent() 123 { 124 RequestState state = paintsContentDetermination(); 125 return state == RequestState::True || state == RequestState::Undetermined; 126 } 127 128 RequestState paintsSubpixelAntialiasedTextDetermination(); 129 bool paintsSubpixelAntialiasedText() 130 { 131 RequestState state = paintsSubpixelAntialiasedTextDetermination(); 132 return state == RequestState::True || state == RequestState::Undetermined; 133 } 134 135 ContentsTypeDetermination contentsTypeDetermination(); 136 bool isSimpleContainer() 137 { 138 return contentsTypeDetermination() == ContentsTypeDetermination::SimpleContainer; 139 } 140 141 bool isDirectlyCompositedImage() 142 { 143 return contentsTypeDetermination() == ContentsTypeDetermination::DirectlyCompositedImage; 144 } 145 146 RenderLayerBacking& m_backing; 147 RequestState m_boxDecorations { RequestState::Unknown }; 148 RequestState m_content { RequestState::Unknown }; 149 RequestState m_subpixelAntialiasedText { RequestState::DontCare }; 150 151 ContentsTypeDetermination m_contentsType { ContentsTypeDetermination::Unknown }; 152 }; 153 154 RequestState PaintedContentsInfo::paintsBoxDecorationsDetermination() 155 { 156 if (m_boxDecorations != RequestState::Unknown) 157 return m_boxDecorations; 158 159 m_boxDecorations = m_backing.paintsBoxDecorations() ? RequestState::True : RequestState::False; 160 return m_boxDecorations; 161 } 162 163 RequestState PaintedContentsInfo::paintsContentDetermination() 164 { 165 if (m_content != RequestState::Unknown && m_subpixelAntialiasedText != RequestState::Unknown) 166 return m_content; 167 168 RenderLayer::PaintedContentRequest contentRequest; 169 if (m_subpixelAntialiasedText == RequestState::Unknown) 170 contentRequest.hasSubpixelAntialiasedText = RequestState::Unknown; 171 172 m_content = m_backing.paintsContent(contentRequest) ? RequestState::True : RequestState::False; 173 174 if (m_subpixelAntialiasedText == RequestState::Unknown) 175 m_subpixelAntialiasedText = contentRequest.hasSubpixelAntialiasedText; 176 177 return m_content; 178 } 179 180 RequestState PaintedContentsInfo::paintsSubpixelAntialiasedTextDetermination() 181 { 182 if (m_subpixelAntialiasedText != RequestState::Unknown) 183 return m_subpixelAntialiasedText; 184 185 paintsContentDetermination(); 186 187 return m_subpixelAntialiasedText; 188 } 189 190 PaintedContentsInfo::ContentsTypeDetermination PaintedContentsInfo::contentsTypeDetermination() 191 { 192 if (m_contentsType != ContentsTypeDetermination::Unknown) 193 return m_contentsType; 194 195 if (m_backing.isSimpleContainerCompositingLayer(*this)) 196 m_contentsType = ContentsTypeDetermination::SimpleContainer; 197 else if (m_backing.isDirectlyCompositedImage()) 198 m_contentsType = ContentsTypeDetermination::DirectlyCompositedImage; 199 else 200 m_contentsType = ContentsTypeDetermination::Painted; 201 202 return m_contentsType; 203 } 204 205 94 206 RenderLayerBacking::RenderLayerBacking(RenderLayer& layer) 95 207 : m_owningLayer(layer) … … 143 255 graphicsLayer->setAcceleratesDrawing(compositor().acceleratedDrawingEnabled()); 144 256 graphicsLayer->setUsesDisplayListDrawing(compositor().displayListDrawingEnabled()); 145 graphicsLayer->setSupportsSubpixelAntialiasedText(renderer().settings().subpixelAntialiasedLayerTextEnabled());146 257 #endif 147 258 … … 610 721 m_graphicsLayer->setReplicatedByLayer(nullptr); 611 722 723 PaintedContentsInfo contentsInfo(*this); 724 612 725 if (!m_owningLayer.isRootLayer()) { 613 bool isSimpleContainer = isSimpleContainerCompositingLayer();614 726 bool didUpdateContentsRect = false; 615 updateDirectlyCompositedBoxDecorations( isSimpleContainer, didUpdateContentsRect);727 updateDirectlyCompositedBoxDecorations(contentsInfo, didUpdateContentsRect); 616 728 } else 617 729 updateRootLayerConfiguration(); 618 730 619 if ( isDirectlyCompositedImage())620 updateImageContents( );731 if (contentsInfo.isDirectlyCompositedImage()) 732 updateImageContents(contentsInfo); 621 733 622 734 if (is<RenderEmbeddedObject>(renderer()) && downcast<RenderEmbeddedObject>(renderer()).allowsAcceleratedCompositing()) { … … 785 897 LayoutRect parentGraphicsLayerRect; 786 898 if (m_owningLayer.isInsideFlowThread()) { 787 // /FIXME: flows/columns need work.899 // FIXME: flows/columns need work. 788 900 LayoutRect ancestorCompositedBounds = ancestorBackingLayer->compositedBounds(); 789 901 ancestorCompositedBounds.setLocation(LayoutPoint()); … … 1093 1205 void RenderLayerBacking::updateAfterDescendants() 1094 1206 { 1095 bool isSimpleContainer = false; 1207 // FIXME: this potentially duplicates work we did in updateConfiguration(). 1208 PaintedContentsInfo contentsInfo(*this); 1209 contentsInfo.setWantsSubpixelAntialiasedTextState(GraphicsLayer::supportsSubpixelAntialiasedLayerText()); 1210 1096 1211 if (!m_owningLayer.isRootLayer()) { 1097 1212 bool didUpdateContentsRect = false; 1098 // FIXME: this duplicates work we did in updateConfiguration(). 1099 isSimpleContainer = isSimpleContainerCompositingLayer(); 1100 updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect); 1213 updateDirectlyCompositedBoxDecorations(contentsInfo, didUpdateContentsRect); 1101 1214 if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer()) 1102 1215 resetContentsRect(); 1103 1216 } 1104 1217 1105 updateDrawsContent( isSimpleContainer);1218 updateDrawsContent(contentsInfo); 1106 1219 1107 1220 m_graphicsLayer->setContentsVisible(m_owningLayer.hasVisibleContent() || hasVisibleNonCompositedDescendants()); … … 1182 1295 } 1183 1296 1184 void RenderLayerBacking::updateDirectlyCompositedBoxDecorations( bool isSimpleContainer, bool& didUpdateContentsRect)1297 void RenderLayerBacking::updateDirectlyCompositedBoxDecorations(PaintedContentsInfo& contentsInfo, bool& didUpdateContentsRect) 1185 1298 { 1186 1299 if (!m_owningLayer.hasVisibleContent()) … … 1189 1302 // The order of operations here matters, since the last valid type of contents needs 1190 1303 // to also update the contentsRect. 1191 updateDirectlyCompositedBackgroundColor( isSimpleContainer, didUpdateContentsRect);1192 updateDirectlyCompositedBackgroundImage( isSimpleContainer, didUpdateContentsRect);1304 updateDirectlyCompositedBackgroundColor(contentsInfo, didUpdateContentsRect); 1305 updateDirectlyCompositedBackgroundImage(contentsInfo, didUpdateContentsRect); 1193 1306 } 1194 1307 … … 1259 1372 void RenderLayerBacking::updateDrawsContent() 1260 1373 { 1261 updateDrawsContent(isSimpleContainerCompositingLayer()); 1262 } 1263 1264 void RenderLayerBacking::updateDrawsContent(bool isSimpleContainer) 1374 PaintedContentsInfo contentsInfo(*this); 1375 contentsInfo.setWantsSubpixelAntialiasedTextState(GraphicsLayer::supportsSubpixelAntialiasedLayerText()); 1376 1377 updateDrawsContent(contentsInfo); 1378 } 1379 1380 void RenderLayerBacking::updateDrawsContent(PaintedContentsInfo& contentsInfo) 1265 1381 { 1266 1382 if (m_scrollingLayer) { … … 1272 1388 m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent); 1273 1389 1274 bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || paintsChildRenderers());1390 bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || contentsInfo.paintsContent()); 1275 1391 m_scrollingContentsLayer->setDrawsContent(hasScrollingPaintedContent); 1276 1392 return; 1277 1393 } 1278 1394 1279 bool hasPaintedContent = containsPaintedContent(isSimpleContainer); 1395 bool hasPaintedContent = containsPaintedContent(contentsInfo); 1396 1397 m_paintsSubpixelAntialiasedText = renderer().settings().subpixelAntialiasedLayerTextEnabled() && contentsInfo.paintsSubpixelAntialiasedText(); 1280 1398 1281 1399 // FIXME: we could refine this to only allocate backing for one of these layers if possible. 1282 1400 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1283 if (m_foregroundLayer) 1401 if (m_foregroundLayer) { 1284 1402 m_foregroundLayer->setDrawsContent(hasPaintedContent); 1403 m_foregroundLayer->setSupportsSubpixelAntialiasedText(m_paintsSubpixelAntialiasedText); 1404 // The text content is painted into the foreground layer. 1405 // FIXME: this ignores SVG background images which may contain text. 1406 m_graphicsLayer->setSupportsSubpixelAntialiasedText(false); 1407 } else 1408 m_graphicsLayer->setSupportsSubpixelAntialiasedText(m_paintsSubpixelAntialiasedText); 1285 1409 1286 1410 if (m_backgroundLayer) … … 1771 1895 } 1772 1896 1773 void RenderLayerBacking::updateDirectlyCompositedBackgroundColor( bool isSimpleContainer, bool& didUpdateContentsRect)1774 { 1775 if (! isSimpleContainer|| (is<RenderBox>(renderer()) && !downcast<RenderBox>(renderer()).paintsOwnBackground())) {1897 void RenderLayerBacking::updateDirectlyCompositedBackgroundColor(PaintedContentsInfo& contentsInfo, bool& didUpdateContentsRect) 1898 { 1899 if (!contentsInfo.isSimpleContainer() || (is<RenderBox>(renderer()) && !downcast<RenderBox>(renderer()).paintsOwnBackground())) { 1776 1900 m_graphicsLayer->setContentsToSolidColor(Color()); 1777 1901 return; … … 1788 1912 } 1789 1913 1790 void RenderLayerBacking::updateDirectlyCompositedBackgroundImage( bool isSimpleContainer, bool& didUpdateContentsRect)1914 void RenderLayerBacking::updateDirectlyCompositedBackgroundImage(PaintedContentsInfo& contentsInfo, bool& didUpdateContentsRect) 1791 1915 { 1792 1916 if (!GraphicsLayer::supportsContentsTiling()) 1793 1917 return; 1794 1918 1795 if ( isDirectlyCompositedImage())1919 if (contentsInfo.isDirectlyCompositedImage()) 1796 1920 return; 1797 1921 1798 1922 auto& style = renderer().style(); 1799 if (! isSimpleContainer|| !style.hasBackgroundImage()) {1923 if (!contentsInfo.isSimpleContainer() || !style.hasBackgroundImage()) { 1800 1924 m_graphicsLayer->setContentsToImage(0); 1801 1925 return; … … 1872 1996 } 1873 1997 1874 bool RenderLayerBacking::paintsChildRenderers() const 1875 { 1876 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildRenderers()) 1877 return true; 1878 1879 if (isPaintDestinationForDescendantLayers()) 1880 return true; 1881 1882 return false; 1998 bool RenderLayerBacking::paintsContent(RenderLayer::PaintedContentRequest& request) const 1999 { 2000 bool paintsContent = false; 2001 2002 if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildRenderers(request)) 2003 paintsContent = true; 2004 2005 if (request.isSatisfied()) 2006 return paintsContent; 2007 2008 if (isPaintDestinationForDescendantLayers(request)) 2009 paintsContent = true; 2010 2011 if (request.isSatisfied()) 2012 return paintsContent; 2013 2014 if (request.hasPaintedContent == RequestState::Unknown) 2015 request.hasPaintedContent = RequestState::False; 2016 2017 if (request.hasSubpixelAntialiasedText == RequestState::Unknown) 2018 request.hasSubpixelAntialiasedText = RequestState::False; 2019 2020 return paintsContent; 1883 2021 } 1884 2022 … … 1903 2041 // It may have no children, or all its children may be themselves composited. 1904 2042 // This is a useful optimization, because it allows us to avoid allocating backing store. 1905 bool RenderLayerBacking::isSimpleContainerCompositingLayer( ) const2043 bool RenderLayerBacking::isSimpleContainerCompositingLayer(PaintedContentsInfo& contentsInfo) const 1906 2044 { 1907 2045 if (renderer().isRenderReplaced() && (!isCompositedPlugin(renderer()) || isRestartedPlugin(renderer()))) … … 1911 2049 return false; 1912 2050 1913 if ( paintsBoxDecorations() || paintsChildRenderers())2051 if (contentsInfo.paintsBoxDecorations() || contentsInfo.paintsContent()) 1914 2052 return false; 1915 2053 … … 1949 2087 } 1950 2088 2089 // Returning true stops the traversal. 1951 2090 enum class LayerTraversal { Continue, Stop }; 1952 2091 … … 2009 2148 2010 2149 // Conservative test for having no rendered children. 2011 bool RenderLayerBacking::isPaintDestinationForDescendantLayers( ) const2150 bool RenderLayerBacking::isPaintDestinationForDescendantLayers(RenderLayer::PaintedContentRequest& request) const 2012 2151 { 2013 2152 bool hasPaintingDescendant = false; 2014 traverseVisibleNonCompositedDescendantLayers(m_owningLayer, [&hasPaintingDescendant ](const RenderLayer& layer) {2015 hasPaintingDescendant = layer.isVisuallyNonEmpty();2016 return hasPaintingDescendant? LayerTraversal::Stop : LayerTraversal::Continue;2153 traverseVisibleNonCompositedDescendantLayers(m_owningLayer, [&hasPaintingDescendant, &request](const RenderLayer& layer) { 2154 hasPaintingDescendant |= layer.isVisuallyNonEmpty(&request); 2155 return (hasPaintingDescendant && request.isSatisfied()) ? LayerTraversal::Stop : LayerTraversal::Continue; 2017 2156 }); 2018 2157 … … 2024 2163 bool hasVisibleDescendant = false; 2025 2164 traverseVisibleNonCompositedDescendantLayers(m_owningLayer, [&hasVisibleDescendant](const RenderLayer& layer) { 2026 hasVisibleDescendant = layer.hasVisibleContent();2165 hasVisibleDescendant |= layer.hasVisibleContent(); 2027 2166 return hasVisibleDescendant ? LayerTraversal::Stop : LayerTraversal::Continue; 2028 2167 }); … … 2031 2170 } 2032 2171 2033 bool RenderLayerBacking::containsPaintedContent( bool isSimpleContainer) const2034 { 2035 if ( isSimpleContainer|| paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer.isReflection())2036 return false; 2037 2038 if ( isDirectlyCompositedImage())2172 bool RenderLayerBacking::containsPaintedContent(PaintedContentsInfo& contentsInfo) const 2173 { 2174 if (contentsInfo.isSimpleContainer() || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer.isReflection()) 2175 return false; 2176 2177 if (contentsInfo.isDirectlyCompositedImage()) 2039 2178 return false; 2040 2179 … … 2086 2225 void RenderLayerBacking::contentChanged(ContentChangeType changeType) 2087 2226 { 2088 if ((changeType == ImageChanged) && isDirectlyCompositedImage()) { 2089 updateImageContents(); 2227 PaintedContentsInfo contentsInfo(*this); 2228 if ((changeType == ImageChanged) && contentsInfo.isDirectlyCompositedImage()) { 2229 updateImageContents(contentsInfo); 2090 2230 return; 2091 2231 } … … 2108 2248 } 2109 2249 2110 void RenderLayerBacking::updateImageContents( )2250 void RenderLayerBacking::updateImageContents(PaintedContentsInfo& contentsInfo) 2111 2251 { 2112 2252 auto& imageRenderer = downcast<RenderImage>(renderer()); … … 2133 2273 2134 2274 m_graphicsLayer->setContentsToImage(image); 2135 bool isSimpleContainer = false;2136 updateDrawsContent( isSimpleContainer);2275 2276 updateDrawsContent(contentsInfo); 2137 2277 2138 2278 // Image animation is "lazy", in that it automatically stops unless someone is drawing -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r213435 r213466 36 36 37 37 class KeyframeList; 38 class PaintedContentsInfo; 38 39 class RenderLayerCompositor; 39 40 class TiledBacking; … … 189 190 190 191 void updateDebugIndicators(bool showBorder, bool showRepaintCounter); 192 bool paintsSubpixelAntialiasedText() const { return m_paintsSubpixelAntialiasedText; } 191 193 192 194 // GraphicsLayerClient interface … … 252 254 253 255 private: 256 friend class PaintedContentsInfo; 257 254 258 FloatRect backgroundBoxForSimpleContainerPainting() const; 255 259 … … 278 282 bool requiresScrollCornerLayer() const; 279 283 bool updateScrollingLayers(bool scrollingLayers); 280 void updateDrawsContent(bool isSimpleContainer); 284 281 285 void updateChildClippingStrategy(bool needsDescendantsClippingLayer); 282 286 … … 307 311 // Return the opacity value that this layer should use for compositing. 308 312 float compositingOpacity(float rendererOpacity) const; 309 313 Color rendererBackgroundColor() const; 314 310 315 bool isMainFrameRenderViewLayer() const; 311 316 312 317 bool paintsBoxDecorations() const; 313 bool paintsChildRenderers() const; 318 bool paintsContent(RenderLayer::PaintedContentRequest&) const; 319 320 void updateDrawsContent(PaintedContentsInfo&); 314 321 315 322 // Returns true if this compositing layer has no visible content. 316 bool isSimpleContainerCompositingLayer( ) const;323 bool isSimpleContainerCompositingLayer(PaintedContentsInfo&) const; 317 324 // Returns true if this layer has content that needs to be rendered by painting into the backing store. 318 bool containsPaintedContent( bool isSimpleContainer) const;325 bool containsPaintedContent(PaintedContentsInfo&) const; 319 326 // Returns true if the RenderLayer just contains an image that we can composite directly. 320 327 bool isDirectlyCompositedImage() const; 321 void updateImageContents(); 322 323 Color rendererBackgroundColor() const; 324 325 void updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect); 326 void updateDirectlyCompositedBackgroundColor(bool isSimpleContainer, bool& didUpdateContentsRect); 327 void updateDirectlyCompositedBackgroundImage(bool isSimpleContainer, bool& didUpdateContentsRect); 328 void updateImageContents(PaintedContentsInfo&); 329 330 void updateDirectlyCompositedBoxDecorations(PaintedContentsInfo&, bool& didUpdateContentsRect); 331 void updateDirectlyCompositedBackgroundColor(PaintedContentsInfo&, bool& didUpdateContentsRect); 332 void updateDirectlyCompositedBackgroundImage(PaintedContentsInfo&, bool& didUpdateContentsRect); 328 333 329 334 void resetContentsRect(); 330 335 331 bool isPaintDestinationForDescendantLayers( ) const;336 bool isPaintDestinationForDescendantLayers(RenderLayer::PaintedContentRequest&) const; 332 337 bool hasVisibleNonCompositedDescendants() const; 333 338 … … 383 388 #endif 384 389 bool m_backgroundLayerPaintsFixedRootBackground { false }; 390 bool m_paintsSubpixelAntialiasedText { false }; // This is for logging only. 385 391 }; 386 392 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r212484 r213466 842 842 logString.appendLiteral("background"); 843 843 } 844 845 if (backing->paintsSubpixelAntialiasedText()) { 846 if (prependSpace) 847 logString.appendLiteral(", "); 848 logString.appendLiteral("texty"); 849 } 844 850 845 851 logString.appendLiteral("] "); -
trunk/Source/WebCore/testing/Internals.cpp
r213458 r213466 1349 1349 } 1350 1350 1351 void Internals::setFontSmoothingEnabled(bool enabled) 1352 { 1353 WebCore::FontCascade::setShouldUseSmoothing(enabled); 1354 } 1355 1351 1356 ExceptionOr<void> Internals::setLowPowerModeEnabled(bool isEnabled) 1352 1357 { -
trunk/Source/WebCore/testing/Internals.h
r213393 r213466 177 177 178 178 void invalidateFontCache(); 179 void setFontSmoothingEnabled(bool); 180 179 181 ExceptionOr<void> setLowPowerModeEnabled(bool); 180 182 -
trunk/Source/WebCore/testing/Internals.idl
r213393 r213466 161 161 162 162 void invalidateFontCache(); 163 void setFontSmoothingEnabled(boolean enabled); 163 164 164 165 [MayThrowException] void setScrollViewPosition(long x, long y);
Note:
See TracChangeset
for help on using the changeset viewer.