<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[280361] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/280361">280361</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2021-07-27 16:48:49 -0700 (Tue, 27 Jul 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GPU Process] Code cleanup after <a href="http://trac.webkit.org/projects/webkit/changeset/280356">r280356</a>
https://bugs.webkit.org/show_bug.cgi?id=228495

Reviewed by Wenson Hsieh.

Source/WebCore:

3 things:
1. Rename cacheNativeImage()/cacheFont() to recordNativeImageUse()/recordFontUse() since it does more
       than caching now
2. Mark overridden functions as final in RemoteImageBufferProxy because no class inherits from it
3. Remove unnecessary WebCore:: where it isn't necessary

No new tests because there is no behavior change.

* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::putPixelBuffer):
(WebCore::DisplayList::Recorder::recordNativeImageUse):
(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendDrawGlyphsItemWithCachedFont):
(WebCore::DisplayList::Recorder::drawImageBuffer):
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::drawPattern):
(WebCore::DisplayList::Recorder::cacheNativeImage): Deleted.
* platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::Delegate::recordNativeImageUse):
(WebCore::DisplayList::Recorder::Delegate::recordFontUse):
(WebCore::DisplayList::Recorder::Delegate::cacheNativeImage): Deleted.
(WebCore::DisplayList::Recorder::Delegate::cacheFont): Deleted.

Source/WebKit:

* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::putPixelBuffer):
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::recordNativeImageUse):
(WebKit::RemoteResourceCacheProxy::recordFontUse):
(WebKit::RemoteResourceCacheProxy::cacheNativeImage): Deleted.
(WebKit::RemoteResourceCacheProxy::cacheFont): Deleted.
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh">trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebProcessGPUgraphicsRemoteImageBufferProxyh">trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessGPUgraphicsRemoteResourceCacheProxycpp">trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessGPUgraphicsRemoteResourceCacheProxyh">trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebCore/ChangeLog      2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2021-07-27  Myles C. Maxfield  <mmaxfield@apple.com>
</span><span class="cx"> 
</span><ins>+        [GPU Process] Code cleanup after r280356
+        https://bugs.webkit.org/show_bug.cgi?id=228495
+
+        Reviewed by Wenson Hsieh.
+
+        3 things:
+        1. Rename cacheNativeImage()/cacheFont() to recordNativeImageUse()/recordFontUse() since it does more
+               than caching now
+        2. Mark overridden functions as final in RemoteImageBufferProxy because no class inherits from it
+        3. Remove unnecessary WebCore:: where it isn't necessary
+
+        No new tests because there is no behavior change.
+
+        * platform/graphics/displaylists/DisplayListRecorder.cpp:
+        (WebCore::DisplayList::Recorder::putPixelBuffer):
+        (WebCore::DisplayList::Recorder::recordNativeImageUse):
+        (WebCore::DisplayList::Recorder::appendStateChangeItem):
+        (WebCore::DisplayList::Recorder::appendDrawGlyphsItemWithCachedFont):
+        (WebCore::DisplayList::Recorder::drawImageBuffer):
+        (WebCore::DisplayList::Recorder::drawNativeImage):
+        (WebCore::DisplayList::Recorder::drawPattern):
+        (WebCore::DisplayList::Recorder::cacheNativeImage): Deleted.
+        * platform/graphics/displaylists/DisplayListRecorder.h:
+        (WebCore::DisplayList::Recorder::Delegate::recordNativeImageUse):
+        (WebCore::DisplayList::Recorder::Delegate::recordFontUse):
+        (WebCore::DisplayList::Recorder::Delegate::cacheNativeImage): Deleted.
+        (WebCore::DisplayList::Recorder::Delegate::cacheFont): Deleted.
+
+2021-07-27  Myles C. Maxfield  <mmaxfield@apple.com>
+
</ins><span class="cx">         [GPU Process] Start tracking resource uses for NativeImages and Fonts
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=228224
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecordercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp      2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp 2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     append<GetPixelBuffer>(outputFormat, sourceRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Recorder::putPixelBuffer(const WebCore::PixelBuffer& pixelBuffer, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint, WebCore::AlphaPremultiplication destFormat)
</del><ins>+void Recorder::putPixelBuffer(const PixelBuffer& pixelBuffer, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat)
</ins><span class="cx"> {
</span><span class="cx">     append<PutPixelBuffer>(pixelBuffer, srcRect, destPoint, destFormat);
</span><span class="cx"> }
</span><span class="lines">@@ -101,10 +101,10 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Recorder::cacheNativeImage(NativeImage& image)
</del><ins>+void Recorder::recordNativeImageUse(NativeImage& image)
</ins><span class="cx"> {
</span><span class="cx">     if (m_delegate)
</span><del>-        m_delegate->cacheNativeImage(image);
</del><ins>+        m_delegate->recordNativeImageUse(image);
</ins><span class="cx">     m_displayList.cacheNativeImage(image);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -112,9 +112,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (!containsOnlyInlineStateChanges(changes, changeFlags)) {
</span><span class="cx">         if (auto pattern = changes.m_state.strokePattern)
</span><del>-            cacheNativeImage(pattern->tileImage());
</del><ins>+            recordNativeImageUse(pattern->tileImage());
</ins><span class="cx">         if (auto pattern = changes.m_state.fillPattern)
</span><del>-            cacheNativeImage(pattern->tileImage());
</del><ins>+            recordNativeImageUse(pattern->tileImage());
</ins><span class="cx">         append<SetState>(changes.m_state, changeFlags);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -193,12 +193,12 @@
</span><span class="cx"> void Recorder::appendDrawGlyphsItemWithCachedFont(const Font& font, const GlyphBufferGlyph* glyphs, const GlyphBufferAdvance* advances, unsigned count, const FloatPoint& localAnchor, FontSmoothingMode smoothingMode)
</span><span class="cx"> {
</span><span class="cx">     if (m_delegate)
</span><del>-        m_delegate->cacheFont(const_cast<Font&>(font));
</del><ins>+        m_delegate->recordFontUse(const_cast<Font&>(font));
</ins><span class="cx">     m_displayList.cacheFont(const_cast<Font&>(font));
</span><span class="cx">     append<DrawGlyphs>(font, glyphs, advances, count, localAnchor, smoothingMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Recorder::drawImageBuffer(WebCore::ImageBuffer& imageBuffer, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options)
</del><ins>+void Recorder::drawImageBuffer(ImageBuffer& imageBuffer, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options)
</ins><span class="cx"> {
</span><span class="cx">     if (!canDrawImageBuffer(imageBuffer)) {
</span><span class="cx">         GraphicsContext::drawImageBuffer(imageBuffer, destRect, srcRect, options);
</span><span class="lines">@@ -210,13 +210,13 @@
</span><span class="cx"> 
</span><span class="cx"> void Recorder::drawNativeImage(NativeImage& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options)
</span><span class="cx"> {
</span><del>-    cacheNativeImage(image);
</del><ins>+    recordNativeImageUse(image);
</ins><span class="cx">     append<DrawNativeImage>(image.renderingResourceIdentifier(), imageSize, destRect, srcRect, options);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Recorder::drawPattern(NativeImage& image, const FloatSize& imageSize, const FloatRect& destRect, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options)
</span><span class="cx"> {
</span><del>-    cacheNativeImage(image);
</del><ins>+    recordNativeImageUse(image);
</ins><span class="cx">     append<DrawPattern>(image.renderingResourceIdentifier(), imageSize, destRect, tileRect, patternTransform, phase, spacing, options);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsdisplaylistsDisplayListRecorderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h        2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h   2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -67,9 +67,9 @@
</span><span class="cx">     public:
</span><span class="cx">         virtual ~Delegate() { }
</span><span class="cx">         virtual bool canAppendItemOfType(ItemType) { return false; }
</span><del>-        virtual void cacheNativeImage(NativeImage&) { }
</del><ins>+        virtual void recordNativeImageUse(NativeImage&) { }
</ins><span class="cx">         virtual bool isCachedImageBuffer(const ImageBuffer&) const { return false; }
</span><del>-        virtual void cacheFont(Font&) { }
</del><ins>+        virtual void recordFontUse(Font&) { }
</ins><span class="cx">         virtual RenderingMode renderingMode() const { return RenderingMode::Unaccelerated; }
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx">     template<typename T>
</span><span class="cx">     static constexpr bool itemNeedsState();
</span><span class="cx"> 
</span><del>-    void cacheNativeImage(NativeImage&);
</del><ins>+    void recordNativeImageUse(NativeImage&);
</ins><span class="cx"> 
</span><span class="cx">     void appendStateChangeItemIfNecessary();
</span><span class="cx">     void appendStateChangeItem(const GraphicsContextStateChange&, GraphicsContextState::StateChangeFlags);
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebKit/ChangeLog       2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2021-07-27  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [GPU Process] Code cleanup after r280356
+        https://bugs.webkit.org/show_bug.cgi?id=228495
+
+        Reviewed by Wenson Hsieh.
+
+        * WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
+        (WebKit::RemoteImageBufferProxy::putPixelBuffer):
+        * WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
+        (WebKit::RemoteResourceCacheProxy::recordNativeImageUse):
+        (WebKit::RemoteResourceCacheProxy::recordFontUse):
+        (WebKit::RemoteResourceCacheProxy::cacheNativeImage): Deleted.
+        (WebKit::RemoteResourceCacheProxy::cacheFont): Deleted.
+        * WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
+
</ins><span class="cx"> 2021-07-27  Aditya Keerthi  <akeerthi@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS] REGRESSION: Tapping a <select> element does not show a menu on many websites
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessGPUgraphicsRemoteImageBufferProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h     2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h        2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">         m_drawingContext.displayList().setTracksDrawingItemExtents(false);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    WebCore::RenderingMode renderingMode() const override { return BaseDisplayListImageBuffer::renderingMode(); }
</del><ins>+    WebCore::RenderingMode renderingMode() const final { return BaseDisplayListImageBuffer::renderingMode(); }
</ins><span class="cx"> 
</span><span class="cx">     // It is safe to access m_receivedFlushIdentifier from the main thread without locking since it
</span><span class="cx">     // only gets modified on the main thread.
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">         return m_sentFlushIdentifier != m_receivedFlushIdentifier;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void didFlush(WebCore::DisplayList::FlushIdentifier flushIdentifier) override
</del><ins>+    void didFlush(WebCore::DisplayList::FlushIdentifier flushIdentifier) final
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(isMainRunLoop());
</span><span class="cx">         Locker locker { m_receivedFlushIdentifierLock };
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx">             RELEASE_LOG_FAULT(SharedDisplayLists, "Exceeded timeout while waiting for flush in remote rendering backend: %" PRIu64 ".", m_remoteRenderingBackendProxy->renderingBackendIdentifier().toUInt64());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    WebCore::ImageBufferBackend* ensureBackendCreated() const override
</del><ins>+    WebCore::ImageBufferBackend* ensureBackendCreated() const final
</ins><span class="cx">     {
</span><span class="cx">         if (!m_remoteRenderingBackendProxy)
</span><span class="cx">             return m_backend.get();
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx">         return m_backend.get();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    String toDataURL(const String& mimeType, std::optional<double> quality, WebCore::PreserveResolution preserveResolution) const override
</del><ins>+    String toDataURL(const String& mimeType, std::optional<double> quality, WebCore::PreserveResolution preserveResolution) const final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return { };
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">         return m_remoteRenderingBackendProxy->getDataURLForImageBuffer(mimeType, quality, preserveResolution, m_renderingResourceIdentifier);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Vector<uint8_t> toData(const String& mimeType, std::optional<double> quality = std::nullopt) const override
</del><ins>+    Vector<uint8_t> toData(const String& mimeType, std::optional<double> quality = std::nullopt) const final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return { };
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx">         return m_remoteRenderingBackendProxy->getDataForImageBuffer(mimeType, quality, m_renderingResourceIdentifier);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr<WebCore::NativeImage> copyNativeImage(WebCore::BackingStoreCopy = WebCore::BackingStoreCopy::CopyBackingStore) const override
</del><ins>+    RefPtr<WebCore::NativeImage> copyNativeImage(WebCore::BackingStoreCopy = WebCore::BackingStoreCopy::CopyBackingStore) const final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return { };
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx">         return WebCore::NativeImage::create(bitmap->createPlatformImage());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr<WebCore::Image> copyImage(WebCore::BackingStoreCopy = WebCore::BackingStoreCopy::CopyBackingStore, WebCore::PreserveResolution preserveResolution = WebCore::PreserveResolution::No) const override
</del><ins>+    RefPtr<WebCore::Image> copyImage(WebCore::BackingStoreCopy = WebCore::BackingStoreCopy::CopyBackingStore, WebCore::PreserveResolution preserveResolution = WebCore::PreserveResolution::No) const final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return { };
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">         return bitmap->createImage();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    std::optional<WebCore::PixelBuffer> getPixelBuffer(const WebCore::PixelBufferFormat& destinationFormat, const WebCore::IntRect& srcRect) const override
</del><ins>+    std::optional<WebCore::PixelBuffer> getPixelBuffer(const WebCore::PixelBufferFormat& destinationFormat, const WebCore::IntRect& srcRect) const final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return std::nullopt;
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">         return pixelBuffer;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void putPixelBuffer(const WebCore::PixelBuffer& pixelBuffer, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint = { }, WebCore::AlphaPremultiplication destFormat = WebCore::AlphaPremultiplication::Premultiplied) override
</del><ins>+    void putPixelBuffer(const WebCore::PixelBuffer& pixelBuffer, const WebCore::IntRect& srcRect, const WebCore::IntPoint& destPoint = { }, WebCore::AlphaPremultiplication destFormat = WebCore::AlphaPremultiplication::Premultiplied) final
</ins><span class="cx">     {
</span><span class="cx">         // The math inside PixelBuffer::create() doesn't agree with the math inside ImageBufferBackend::putPixelBuffer() about how m_resolutionScale interacts with the data in the ImageBuffer.
</span><span class="cx">         // This means that putPixelBuffer() is only called when resolutionScale() == 1.
</span><span class="lines">@@ -238,15 +238,15 @@
</span><span class="cx">         m_drawingContext.recorder().putPixelBuffer(pixelBuffer, srcRect, destPoint, destFormat);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool prefersPreparationForDisplay() override { return true; }
</del><ins>+    bool prefersPreparationForDisplay() final { return true; }
</ins><span class="cx"> 
</span><del>-    void flushContext() override
</del><ins>+    void flushContext() final
</ins><span class="cx">     {
</span><span class="cx">         flushDrawingContext();
</span><span class="cx">         m_backend->flushContext();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void flushDrawingContext() override
</del><ins>+    void flushDrawingContext() final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return;
</span><span class="lines">@@ -256,7 +256,7 @@
</span><span class="cx">         waitForDidFlushWithTimeout();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void flushDrawingContextAsync() override
</del><ins>+    void flushDrawingContextAsync() final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return;
</span><span class="lines">@@ -270,13 +270,13 @@
</span><span class="cx">         clearDisplayList();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void cacheNativeImage(WebCore::NativeImage& image) override
</del><ins>+    void recordNativeImageUse(WebCore::NativeImage& image) final
</ins><span class="cx">     {
</span><span class="cx">         if (m_remoteRenderingBackendProxy)
</span><del>-            m_remoteRenderingBackendProxy->remoteResourceCacheProxy().cacheNativeImage(image);
</del><ins>+            m_remoteRenderingBackendProxy->remoteResourceCacheProxy().recordNativeImageUse(image);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool isCachedImageBuffer(const WebCore::ImageBuffer& imageBuffer) const override
</del><ins>+    bool isCachedImageBuffer(const WebCore::ImageBuffer& imageBuffer) const final
</ins><span class="cx">     {
</span><span class="cx">         if (!m_remoteRenderingBackendProxy)
</span><span class="cx">             return false;
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">         m_drawingContext.displayList().clear();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool canAppendItemOfType(WebCore::DisplayList::ItemType) override
</del><ins>+    bool canAppendItemOfType(WebCore::DisplayList::ItemType) final
</ins><span class="cx">     {
</span><span class="cx">         if (UNLIKELY(!m_remoteRenderingBackendProxy))
</span><span class="cx">             return false;
</span><span class="lines">@@ -311,16 +311,16 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void didAppendData(const WebCore::DisplayList::ItemBufferHandle& handle, size_t numberOfBytes, WebCore::DisplayList::DidChangeItemBuffer didChangeItemBuffer) override
</del><ins>+    void didAppendData(const WebCore::DisplayList::ItemBufferHandle& handle, size_t numberOfBytes, WebCore::DisplayList::DidChangeItemBuffer didChangeItemBuffer) final
</ins><span class="cx">     {
</span><span class="cx">         if (LIKELY(m_remoteRenderingBackendProxy))
</span><span class="cx">             m_remoteRenderingBackendProxy->didAppendData(handle, numberOfBytes, didChangeItemBuffer, m_renderingResourceIdentifier);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void cacheFont(WebCore::Font& font) override
</del><ins>+    void recordFontUse(WebCore::Font& font) final
</ins><span class="cx">     {
</span><span class="cx">         if (m_remoteRenderingBackendProxy)
</span><del>-            m_remoteRenderingBackendProxy->remoteResourceCacheProxy().cacheFont(font);
</del><ins>+            m_remoteRenderingBackendProxy->remoteResourceCacheProxy().recordFontUse(font);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     WebCore::DisplayList::ItemBufferHandle createItemBuffer(size_t capacity) final
</span><span class="lines">@@ -343,7 +343,7 @@
</span><span class="cx">         }, item);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    std::unique_ptr<WebCore::ThreadSafeImageBufferFlusher> createFlusher() override
</del><ins>+    std::unique_ptr<WebCore::ThreadSafeImageBufferFlusher> createFlusher() final
</ins><span class="cx">     {
</span><span class="cx">         return WTF::makeUnique<ThreadSafeRemoteImageBufferFlusher<BackendType>>(*this);
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessGPUgraphicsRemoteResourceCacheProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp 2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp    2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     return bitmap;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteResourceCacheProxy::cacheNativeImage(NativeImage& image)
</del><ins>+void RemoteResourceCacheProxy::recordNativeImageUse(NativeImage& image)
</ins><span class="cx"> {
</span><span class="cx">     auto iterator = m_nativeImages.find(image.renderingResourceIdentifier());
</span><span class="cx">     if (iterator != m_nativeImages.end()) {
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">     m_remoteRenderingBackendProxy.cacheNativeImage(handle, image.renderingResourceIdentifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteResourceCacheProxy::cacheFont(Font& font)
</del><ins>+void RemoteResourceCacheProxy::recordFontUse(Font& font)
</ins><span class="cx"> {
</span><span class="cx">     auto result = m_fonts.ensure(font.renderingResourceIdentifier(), [&] {
</span><span class="cx">         return FontState { m_remoteRenderingBackendProxy.renderingUpdateID(), 1 };
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessGPUgraphicsRemoteResourceCacheProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h (280360 => 280361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h   2021-07-27 23:45:49 UTC (rev 280360)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h      2021-07-27 23:48:49 UTC (rev 280361)
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx">     WebCore::ImageBuffer* cachedImageBuffer(WebCore::RenderingResourceIdentifier);
</span><span class="cx">     void releaseImageBuffer(WebCore::RenderingResourceIdentifier);
</span><span class="cx"> 
</span><del>-    void cacheNativeImage(WebCore::NativeImage&);
-    void cacheFont(WebCore::Font&);
</del><ins>+    void recordNativeImageUse(WebCore::NativeImage&);
+    void recordFontUse(WebCore::Font&);
</ins><span class="cx"> 
</span><span class="cx">     void finalizeRenderingUpdate();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>