WebKit Bugzilla
Attachment 357664 Details for
Bug 192230
: REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-192230-20181219083723.patch (text/plain), 6.12 KB, created by
Zan Dobersek
on 2018-12-18 23:37:24 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-12-18 23:37:24 PST
Size:
6.12 KB
patch
obsolete
>Subversion Revision: 239370 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ed5f04ecfc709b2c68eb873a8d3bee6aaee8ee2a..2c809d0b8520f811df1264c74c9cf51fb2b26bcc 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-12-18 Zan Dobersek <zdobersek@igalia.com> >+ >+ REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab >+ https://bugs.webkit.org/show_bug.cgi?id=192230 >+ >+ Reviewed by Carlos Garcia Campos. >+ >+ Single tile can after r235165 be assigned multiple content updates >+ without a commit occurring between each update, whereas before these >+ commits were done for each update. >+ >+ To avoid repeating updates for a single tile purging information about >+ the previous update, these updates are now accumulated inside a Vector >+ and then iterated over during the commit phase. >+ >+ * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp: >+ (WebCore::CoordinatedBackingStoreTile::addUpdate): >+ (WebCore::CoordinatedBackingStoreTile::swapBuffers): >+ (WebCore::CoordinatedBackingStore::updateTile): >+ (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted. >+ * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h: >+ (WebCore::CoordinatedBackingStoreTile::scale const): >+ > 2018-12-18 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >index 0cfd9f05ddea4fca8e69b71d32d7caead8471188..5f0952925a1908ecad745523a4743b33e9cda297 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >@@ -29,34 +29,34 @@ > > namespace WebCore { > >-void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) >+void CoordinatedBackingStoreTile::addUpdate(Update&& update) > { >- if (!m_buffer) >- return; >+ m_updates.append(WTFMove(update)); >+} > >- ASSERT(textureMapper.maxTextureSize().width() >= m_tileRect.size().width()); >- ASSERT(textureMapper.maxTextureSize().height() >= m_tileRect.size().height()); >+void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) >+{ >+ auto updates = WTFMove(m_updates); >+ for (auto& update : updates) { >+ if (!update.buffer) >+ continue; > >- FloatRect unscaledTileRect(m_tileRect); >- unscaledTileRect.scale(1. / m_scale); >+ ASSERT(textureMapper.maxTextureSize().width() >= update.tileRect.size().width()); >+ ASSERT(textureMapper.maxTextureSize().height() >= update.tileRect.size().height()); > >- if (!m_texture || unscaledTileRect != rect()) { >- setRect(unscaledTileRect); >- m_texture = textureMapper.acquireTextureFromPool(m_tileRect.size(), m_buffer->supportsAlpha() ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag); >- } else if (m_buffer->supportsAlpha() == m_texture->isOpaque()) >- m_texture->reset(m_tileRect.size(), m_buffer->supportsAlpha()); >+ FloatRect unscaledTileRect(update.tileRect); >+ unscaledTileRect.scale(1. / m_scale); > >- m_buffer->waitUntilPaintingComplete(); >- m_texture->updateContents(m_buffer->data(), m_sourceRect, m_bufferOffset, m_buffer->stride()); >- m_buffer = nullptr; >-} >+ if (!m_texture || unscaledTileRect != rect()) { >+ setRect(unscaledTileRect); >+ m_texture = textureMapper.acquireTextureFromPool(update.tileRect.size(), update.buffer->supportsAlpha() ? BitmapTexture::SupportsAlpha : BitmapTexture::NoFlag); >+ } else if (update.buffer->supportsAlpha() == m_texture->isOpaque()) >+ m_texture->reset(update.tileRect.size(), update.buffer->supportsAlpha()); > >-void CoordinatedBackingStoreTile::setBackBuffer(const IntRect& tileRect, const IntRect& sourceRect, RefPtr<Nicosia::Buffer>&& buffer, const IntPoint& offset) >-{ >- m_sourceRect = sourceRect; >- m_tileRect = tileRect; >- m_bufferOffset = offset; >- m_buffer = WTFMove(buffer); >+ update.buffer->waitUntilPaintingComplete(); >+ m_texture->updateContents(update.buffer->data(), update.sourceRect, update.bufferOffset, update.buffer->stride()); >+ update.buffer = nullptr; >+ } > } > > void CoordinatedBackingStore::createTile(uint32_t id, float scale) >@@ -81,7 +81,7 @@ void CoordinatedBackingStore::updateTile(uint32_t id, const IntRect& sourceRect, > { > CoordinatedBackingStoreTileMap::iterator it = m_tiles.find(id); > ASSERT(it != m_tiles.end()); >- it->value.setBackBuffer(tileRect, sourceRect, WTFMove(buffer), offset); >+ it->value.addUpdate({ WTFMove(buffer), sourceRect, tileRect, offset }); > } > > void CoordinatedBackingStore::setSize(const FloatSize& size) >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h >index 39029c8af7014dd37b98ed0aca60f05fd83e7d59..2542882138159976ee00e321dc6590a28d4cfa3e 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h >@@ -27,6 +27,7 @@ > #include <wtf/HashMap.h> > #include <wtf/HashSet.h> > #include <wtf/RefCounted.h> >+#include <wtf/Vector.h> > > namespace Nicosia { > class Buffer; >@@ -42,15 +43,20 @@ public: > { > } > >- inline float scale() const { return m_scale; } >+ float scale() const { return m_scale; } >+ >+ struct Update { >+ RefPtr<Nicosia::Buffer> buffer; >+ IntRect sourceRect; >+ IntRect tileRect; >+ IntPoint bufferOffset; >+ }; >+ void addUpdate(Update&&); >+ > void swapBuffers(TextureMapper&); >- void setBackBuffer(const IntRect&, const IntRect&, RefPtr<Nicosia::Buffer>&&, const IntPoint&); > > private: >- RefPtr<Nicosia::Buffer> m_buffer; >- IntRect m_sourceRect; >- IntRect m_tileRect; >- IntPoint m_bufferOffset; >+ Vector<Update> m_updates; > float m_scale; > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192230
:
356188
|
356323
|
357438
|
357464
| 357664