WebKit Bugzilla
Attachment 357464 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
bug-192230-20181217210703.patch (text/plain), 5.99 KB, created by
Zan Dobersek
on 2018-12-17 12:07:05 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-12-17 12:07:05 PST
Size:
5.99 KB
patch
obsolete
>Subversion Revision: 239262 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 05949be24b6755555509935ddeb5f9f31f963327..63804e8360c2927dfa84f6e63a2cc07b5eef8e4b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-12-17 Zan Dobersek <zdobersek@igalia.com> >+ >+ REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab >+ https://bugs.webkit.org/show_bug.cgi?id=192230 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-15 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Null pointer dereference in JSC::WriteBarrierBase() >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >index 0cfd9f05ddea4fca8e69b71d32d7caead8471188..edaef0c2426fae32b3e630265c9273c97d1e4b4b 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >@@ -29,34 +29,35 @@ > > namespace WebCore { > >+void CoordinatedBackingStoreTile::addUpdate(Update&& update) >+{ >+ m_updates.append(WTFMove(update)); >+} >+ > void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) > { >- if (!m_buffer) >- return; >+ for (auto& update : m_updates) { >+ if (!update.buffer) >+ continue; > >- ASSERT(textureMapper.maxTextureSize().width() >= m_tileRect.size().width()); >- ASSERT(textureMapper.maxTextureSize().height() >= m_tileRect.size().height()); >+ ASSERT(textureMapper.maxTextureSize().width() >= update.tileRect.size().width()); >+ ASSERT(textureMapper.maxTextureSize().height() >= update.tileRect.size().height()); > >- FloatRect unscaledTileRect(m_tileRect); >- unscaledTileRect.scale(1. / m_scale); >+ FloatRect unscaledTileRect(update.tileRect); >+ unscaledTileRect.scale(1. / m_scale); > >- 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()); >+ 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()); > >- m_buffer->waitUntilPaintingComplete(); >- m_texture->updateContents(m_buffer->data(), m_sourceRect, m_bufferOffset, m_buffer->stride()); >- m_buffer = nullptr; >-} >+ update.buffer->waitUntilPaintingComplete(); >+ m_texture->updateContents(update.buffer->data(), update.sourceRect, update.bufferOffset, update.buffer->stride()); >+ update.buffer = nullptr; >+ } > >-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); >+ m_updates.clear(); > } > > void CoordinatedBackingStore::createTile(uint32_t id, float scale) >@@ -81,7 +82,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