Title: [255068] trunk/Source/WebCore
Revision
255068
Author
[email protected]
Date
2020-01-24 06:36:09 -0800 (Fri, 24 Jan 2020)

Log Message

[LFC][Integration] LineLayout::paint should take advantage of the glyph display list cache
https://bugs.webkit.org/show_bug.cgi?id=206727
<rdar://problem/58809696>

Reviewed by Antti Koivisto.

* layout/displaytree/DisplayInlineContent.cpp:
(WebCore::Display::InlineContent::~InlineContent):
* layout/displaytree/DisplayInlineContent.h:
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::paint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (255067 => 255068)


--- trunk/Source/WebCore/ChangeLog	2020-01-24 14:11:26 UTC (rev 255067)
+++ trunk/Source/WebCore/ChangeLog	2020-01-24 14:36:09 UTC (rev 255068)
@@ -1,3 +1,17 @@
+2020-01-24  Zalan Bujtas  <[email protected]>
+
+        [LFC][Integration] LineLayout::paint should take advantage of the glyph display list cache
+        https://bugs.webkit.org/show_bug.cgi?id=206727
+        <rdar://problem/58809696>
+
+        Reviewed by Antti Koivisto.
+
+        * layout/displaytree/DisplayInlineContent.cpp:
+        (WebCore::Display::InlineContent::~InlineContent):
+        * layout/displaytree/DisplayInlineContent.h:
+        * layout/integration/LayoutIntegrationLineLayout.cpp:
+        (WebCore::LayoutIntegration::LineLayout::paint):
+
 2020-01-24  Antti Koivisto  <[email protected]>
 
         :matches() doesn't combine correctly with pseudo elements

Modified: trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.cpp (255067 => 255068)


--- trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.cpp	2020-01-24 14:11:26 UTC (rev 255067)
+++ trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.cpp	2020-01-24 14:36:09 UTC (rev 255068)
@@ -28,6 +28,8 @@
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
 
 #include "DisplayInlineContent.h"
+#include "RuntimeEnabledFeatures.h"
+#include "TextPainter.h"
 
 namespace WebCore {
 namespace Display {
@@ -40,7 +42,15 @@
     return { &runs.first(), &runs.last() + 1 };
 }
 
+InlineContent::~InlineContent()
+{
+    if (RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) {
+        for (auto& run : runs)
+            TextPainter::removeGlyphDisplayList(run);
+    }
 }
+
 }
+}
 
 #endif

Modified: trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.h (255067 => 255068)


--- trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.h	2020-01-24 14:11:26 UTC (rev 255067)
+++ trunk/Source/WebCore/layout/displaytree/DisplayInlineContent.h	2020-01-24 14:36:09 UTC (rev 255068)
@@ -36,6 +36,8 @@
 namespace Display {
 
 struct InlineContent : public RefCounted<InlineContent> {
+    ~InlineContent();
+
     using Runs = Vector<Run, 10>;
     using LineBoxes = Vector<LineBox, 5>;
 

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (255067 => 255068)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-01-24 14:11:26 UTC (rev 255067)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-01-24 14:36:09 UTC (rev 255068)
@@ -274,6 +274,7 @@
         if (auto* debugShadow = debugTextShadow())
             textPainter.setShadow(debugShadow);
 
+        textPainter.setGlyphDisplayListIfNeeded(run, paintInfo, style.fontCascade(), paintInfo.context(), textRun);
         textPainter.paint(textRun, rect, textOrigin);
 
         if (!style.textDecorationsInEffect().isEmpty()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to