WebKit Bugzilla
Attachment 346054 Details for
Bug 188158
: [CoordGraphics] Move CoordinatedBackingStore to WebCore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188158-20180730095200.patch (text/plain), 28.03 KB, created by
Zan Dobersek
on 2018-07-30 00:52:02 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-07-30 00:52:02 PDT
Size:
28.03 KB
patch
obsolete
>Subversion Revision: 234349 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bfef6390a7b391a9a7f5dd7cbb568021ed5ee4ad..8db8fa60845148da4a07a5bc421adf5c833d007d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-07-30 Zan Dobersek <zdobersek@igalia.com> >+ >+ [CoordGraphics] Move CoordinatedBackingStore to WebCore >+ https://bugs.webkit.org/show_bug.cgi?id=188158 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Move the CoordinatedBackingStore class from WebKit to WebCore. It has no >+ dependency on anything in the WebKit layer, and it's more suitable to >+ future needs to keep it in the WebCore layer. >+ >+ * platform/TextureMapper.cmake: >+ * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp: Renamed from Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp. >+ * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h: Renamed from Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.h. >+ (WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): >+ (WebCore::CoordinatedBackingStore::rect const): >+ > 2018-07-28 Darin Adler <darin@apple.com> > > [Cocoa] Update more WebCore Objective-C code to be ARC compatible >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index ec9cacbf4b1efb399c6f7cc4bb69f40cf45cb167..9903d893c24998cbf4e17bec756a020211339193 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2018-07-30 Zan Dobersek <zdobersek@igalia.com> >+ >+ [CoordGraphics] Move CoordinatedBackingStore to WebCore >+ https://bugs.webkit.org/show_bug.cgi?id=188158 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Move the CoordinatedBackingStore class from WebKit to WebCore. It has no >+ dependency on anything in the WebKit layer, and it's more suitable to >+ future needs to keep it in the WebCore layer. >+ >+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: >+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h: >+ * SourcesGTK.txt: >+ * SourcesWPE.txt: >+ > 2018-07-28 Andy Estes <aestes@apple.com> > > [Wi-Fi Assertions] Pass a ResumptionReason to resumeWiFiAssertions >diff --git a/Source/WebCore/platform/TextureMapper.cmake b/Source/WebCore/platform/TextureMapper.cmake >index 985ca1598022bf937ba4063b2723302c9679a1da..861085f829ea50896450010c72c8d6de4005f5a5 100644 >--- a/Source/WebCore/platform/TextureMapper.cmake >+++ b/Source/WebCore/platform/TextureMapper.cmake >@@ -33,6 +33,7 @@ if (USE_COORDINATED_GRAPHICS) > platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp > platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp > >+ platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp > platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp > platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp > platform/graphics/texmap/coordinated/Tile.cpp >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..0cfd9f05ddea4fca8e69b71d32d7caead8471188 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp >@@ -0,0 +1,170 @@ >+/* >+ Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) >+ >+ This library is free software; you can redistribute it and/or >+ modify it under the terms of the GNU Library General Public >+ License as published by the Free Software Foundation; either >+ version 2 of the License, or (at your option) any later version. >+ >+ This library is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ Library General Public License for more details. >+ >+ You should have received a copy of the GNU Library General Public License >+ along with this library; see the file COPYING.LIB. If not, write to >+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ Boston, MA 02110-1301, USA. >+ */ >+ >+#include "config.h" >+#include "CoordinatedBackingStore.h" >+ >+#if USE(COORDINATED_GRAPHICS) >+ >+#include "GraphicsLayer.h" >+#include "NicosiaBuffer.h" >+#include "TextureMapper.h" >+#include "TextureMapperGL.h" >+ >+namespace WebCore { >+ >+void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) >+{ >+ if (!m_buffer) >+ return; >+ >+ ASSERT(textureMapper.maxTextureSize().width() >= m_tileRect.size().width()); >+ ASSERT(textureMapper.maxTextureSize().height() >= m_tileRect.size().height()); >+ >+ FloatRect unscaledTileRect(m_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()); >+ >+ m_buffer->waitUntilPaintingComplete(); >+ m_texture->updateContents(m_buffer->data(), m_sourceRect, m_bufferOffset, m_buffer->stride()); >+ m_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); >+} >+ >+void CoordinatedBackingStore::createTile(uint32_t id, float scale) >+{ >+ m_tiles.add(id, CoordinatedBackingStoreTile(scale)); >+ m_scale = scale; >+} >+ >+void CoordinatedBackingStore::removeTile(uint32_t id) >+{ >+ ASSERT(m_tiles.contains(id)); >+ m_tilesToRemove.add(id); >+} >+ >+void CoordinatedBackingStore::removeAllTiles() >+{ >+ for (auto& key : m_tiles.keys()) >+ m_tilesToRemove.add(key); >+} >+ >+void CoordinatedBackingStore::updateTile(uint32_t id, const IntRect& sourceRect, const IntRect& tileRect, RefPtr<Nicosia::Buffer>&& buffer, const IntPoint& offset) >+{ >+ CoordinatedBackingStoreTileMap::iterator it = m_tiles.find(id); >+ ASSERT(it != m_tiles.end()); >+ it->value.setBackBuffer(tileRect, sourceRect, WTFMove(buffer), offset); >+} >+ >+void CoordinatedBackingStore::setSize(const FloatSize& size) >+{ >+ m_pendingSize = size; >+} >+ >+void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper& textureMapper, const TransformationMatrix& transform, float opacity, const FloatRect& rect) >+{ >+ for (auto& tile : tiles) >+ tile->paint(textureMapper, transform, opacity, calculateExposedTileEdges(rect, tile->rect())); >+} >+ >+TransformationMatrix CoordinatedBackingStore::adjustedTransformForRect(const FloatRect& targetRect) >+{ >+ return TransformationMatrix::rectToRect(rect(), targetRect); >+} >+ >+void CoordinatedBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) >+{ >+ if (m_tiles.isEmpty()) >+ return; >+ ASSERT(!m_size.isZero()); >+ >+ Vector<TextureMapperTile*> tilesToPaint; >+ Vector<TextureMapperTile*> previousTilesToPaint; >+ >+ // We have to do this every time we paint, in case the opacity has changed. >+ FloatRect coveredRect; >+ for (auto& tile : m_tiles.values()) { >+ if (!tile.texture()) >+ continue; >+ >+ if (tile.scale() == m_scale) { >+ tilesToPaint.append(&tile); >+ coveredRect.unite(tile.rect()); >+ continue; >+ } >+ >+ // Only show the previous tile if the opacity is high, otherwise effect looks like a bug. >+ // We show the previous-scale tile anyway if it doesn't intersect with any current-scale tile. >+ if (opacity < 0.95 && coveredRect.intersects(tile.rect())) >+ continue; >+ >+ previousTilesToPaint.append(&tile); >+ } >+ >+ // targetRect is on the contents coordinate system, so we must compare two rects on the contents coordinate system. >+ // See TiledBackingStore. >+ TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >+ >+ paintTilesToTextureMapper(previousTilesToPaint, textureMapper, adjustedTransform, opacity, rect()); >+ paintTilesToTextureMapper(tilesToPaint, textureMapper, adjustedTransform, opacity, rect()); >+} >+ >+void CoordinatedBackingStore::drawBorder(TextureMapper& textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform) >+{ >+ TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >+ for (auto& tile : m_tiles.values()) >+ textureMapper.drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform); >+} >+ >+void CoordinatedBackingStore::drawRepaintCounter(TextureMapper& textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform) >+{ >+ TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >+ for (auto& tile : m_tiles.values()) >+ textureMapper.drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform); >+} >+ >+void CoordinatedBackingStore::commitTileOperations(TextureMapper& textureMapper) >+{ >+ if (!m_pendingSize.isZero()) { >+ m_size = m_pendingSize; >+ m_pendingSize = FloatSize(); >+ } >+ >+ for (auto& tileToRemove : m_tilesToRemove) >+ m_tiles.remove(tileToRemove); >+ m_tilesToRemove.clear(); >+ >+ for (auto& tile : m_tiles.values()) >+ tile.swapBuffers(textureMapper); >+} >+ >+} // namespace WebCore >+#endif // USE(COORDINATED_GRAPHICS) >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h >new file mode 100644 >index 0000000000000000000000000000000000000000..39029c8af7014dd37b98ed0aca60f05fd83e7d59 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h >@@ -0,0 +1,89 @@ >+/* >+ Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) >+ >+ This library is free software; you can redistribute it and/or >+ modify it under the terms of the GNU Library General Public >+ License as published by the Free Software Foundation; either >+ version 2 of the License, or (at your option) any later version. >+ >+ This library is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ Library General Public License for more details. >+ >+ You should have received a copy of the GNU Library General Public License >+ along with this library; see the file COPYING.LIB. If not, write to >+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >+ Boston, MA 02110-1301, USA. >+ */ >+ >+#pragma once >+ >+#if USE(COORDINATED_GRAPHICS) >+ >+#include "TextureMapper.h" >+#include "TextureMapperBackingStore.h" >+#include "TextureMapperTile.h" >+#include <wtf/HashMap.h> >+#include <wtf/HashSet.h> >+#include <wtf/RefCounted.h> >+ >+namespace Nicosia { >+class Buffer; >+} >+ >+namespace WebCore { >+ >+class CoordinatedBackingStoreTile : public TextureMapperTile { >+public: >+ explicit CoordinatedBackingStoreTile(float scale = 1) >+ : TextureMapperTile(FloatRect()) >+ , m_scale(scale) >+ { >+ } >+ >+ inline float scale() const { return m_scale; } >+ 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; >+ float m_scale; >+}; >+ >+class CoordinatedBackingStore : public RefCounted<CoordinatedBackingStore>, public TextureMapperBackingStore { >+public: >+ void createTile(uint32_t tileID, float); >+ void removeTile(uint32_t tileID); >+ void removeAllTiles(); >+ void updateTile(uint32_t tileID, const IntRect&, const IntRect&, RefPtr<Nicosia::Buffer>&&, const IntPoint&); >+ static Ref<CoordinatedBackingStore> create() { return adoptRef(*new CoordinatedBackingStore); } >+ void commitTileOperations(TextureMapper&); >+ void setSize(const FloatSize&); >+ void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix&, float) override; >+ void drawBorder(TextureMapper&, const Color&, float borderWidth, const FloatRect&, const TransformationMatrix&) override; >+ void drawRepaintCounter(TextureMapper&, int repaintCount, const Color&, const FloatRect&, const TransformationMatrix&) override; >+ >+private: >+ CoordinatedBackingStore() >+ : m_scale(1.) >+ { } >+ void paintTilesToTextureMapper(Vector<TextureMapperTile*>&, TextureMapper&, const TransformationMatrix&, float, const FloatRect&); >+ TransformationMatrix adjustedTransformForRect(const FloatRect&); >+ FloatRect rect() const { return FloatRect(FloatPoint::zero(), m_size); } >+ >+ typedef HashMap<uint32_t, CoordinatedBackingStoreTile> CoordinatedBackingStoreTileMap; >+ CoordinatedBackingStoreTileMap m_tiles; >+ HashSet<uint32_t> m_tilesToRemove; >+ // FIXME: m_pendingSize should be removed after the following bug is fixed: https://bugs.webkit.org/show_bug.cgi?id=108294 >+ FloatSize m_pendingSize; >+ FloatSize m_size; >+ float m_scale; >+}; >+ >+} // namespace WebKit >+ >+#endif // USE(COORDINATED_GRAPHICS) >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp >deleted file mode 100644 >index 3b708f8dac93360f2b7c17a8f6881d416fbdf1ed..0000000000000000000000000000000000000000 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp >+++ /dev/null >@@ -1,171 +0,0 @@ >-/* >- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) >- >- This library is free software; you can redistribute it and/or >- modify it under the terms of the GNU Library General Public >- License as published by the Free Software Foundation; either >- version 2 of the License, or (at your option) any later version. >- >- This library is distributed in the hope that it will be useful, >- but WITHOUT ANY WARRANTY; without even the implied warranty of >- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- Library General Public License for more details. >- >- You should have received a copy of the GNU Library General Public License >- along with this library; see the file COPYING.LIB. If not, write to >- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >- Boston, MA 02110-1301, USA. >- */ >- >-#include "config.h" >-#include "CoordinatedBackingStore.h" >- >-#if USE(COORDINATED_GRAPHICS) >- >-#include <WebCore/GraphicsLayer.h> >-#include <WebCore/NicosiaBuffer.h> >-#include <WebCore/TextureMapper.h> >-#include <WebCore/TextureMapperGL.h> >- >-namespace WebKit { >-using namespace WebCore; >- >-void CoordinatedBackingStoreTile::swapBuffers(TextureMapper& textureMapper) >-{ >- if (!m_buffer) >- return; >- >- ASSERT(textureMapper.maxTextureSize().width() >= m_tileRect.size().width()); >- ASSERT(textureMapper.maxTextureSize().height() >= m_tileRect.size().height()); >- >- FloatRect unscaledTileRect(m_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()); >- >- m_buffer->waitUntilPaintingComplete(); >- m_texture->updateContents(m_buffer->data(), m_sourceRect, m_bufferOffset, m_buffer->stride()); >- m_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); >-} >- >-void CoordinatedBackingStore::createTile(uint32_t id, float scale) >-{ >- m_tiles.add(id, CoordinatedBackingStoreTile(scale)); >- m_scale = scale; >-} >- >-void CoordinatedBackingStore::removeTile(uint32_t id) >-{ >- ASSERT(m_tiles.contains(id)); >- m_tilesToRemove.add(id); >-} >- >-void CoordinatedBackingStore::removeAllTiles() >-{ >- for (auto& key : m_tiles.keys()) >- m_tilesToRemove.add(key); >-} >- >-void CoordinatedBackingStore::updateTile(uint32_t id, const IntRect& sourceRect, const IntRect& tileRect, RefPtr<Nicosia::Buffer>&& buffer, const IntPoint& offset) >-{ >- CoordinatedBackingStoreTileMap::iterator it = m_tiles.find(id); >- ASSERT(it != m_tiles.end()); >- it->value.setBackBuffer(tileRect, sourceRect, WTFMove(buffer), offset); >-} >- >-void CoordinatedBackingStore::setSize(const FloatSize& size) >-{ >- m_pendingSize = size; >-} >- >-void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile*>& tiles, TextureMapper& textureMapper, const TransformationMatrix& transform, float opacity, const FloatRect& rect) >-{ >- for (auto& tile : tiles) >- tile->paint(textureMapper, transform, opacity, calculateExposedTileEdges(rect, tile->rect())); >-} >- >-TransformationMatrix CoordinatedBackingStore::adjustedTransformForRect(const FloatRect& targetRect) >-{ >- return TransformationMatrix::rectToRect(rect(), targetRect); >-} >- >-void CoordinatedBackingStore::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity) >-{ >- if (m_tiles.isEmpty()) >- return; >- ASSERT(!m_size.isZero()); >- >- Vector<TextureMapperTile*> tilesToPaint; >- Vector<TextureMapperTile*> previousTilesToPaint; >- >- // We have to do this every time we paint, in case the opacity has changed. >- FloatRect coveredRect; >- for (auto& tile : m_tiles.values()) { >- if (!tile.texture()) >- continue; >- >- if (tile.scale() == m_scale) { >- tilesToPaint.append(&tile); >- coveredRect.unite(tile.rect()); >- continue; >- } >- >- // Only show the previous tile if the opacity is high, otherwise effect looks like a bug. >- // We show the previous-scale tile anyway if it doesn't intersect with any current-scale tile. >- if (opacity < 0.95 && coveredRect.intersects(tile.rect())) >- continue; >- >- previousTilesToPaint.append(&tile); >- } >- >- // targetRect is on the contents coordinate system, so we must compare two rects on the contents coordinate system. >- // See TiledBackingStore. >- TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >- >- paintTilesToTextureMapper(previousTilesToPaint, textureMapper, adjustedTransform, opacity, rect()); >- paintTilesToTextureMapper(tilesToPaint, textureMapper, adjustedTransform, opacity, rect()); >-} >- >-void CoordinatedBackingStore::drawBorder(TextureMapper& textureMapper, const Color& borderColor, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& transform) >-{ >- TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >- for (auto& tile : m_tiles.values()) >- textureMapper.drawBorder(borderColor, borderWidth, tile.rect(), adjustedTransform); >-} >- >-void CoordinatedBackingStore::drawRepaintCounter(TextureMapper& textureMapper, int repaintCount, const Color& borderColor, const FloatRect& targetRect, const TransformationMatrix& transform) >-{ >- TransformationMatrix adjustedTransform = transform * adjustedTransformForRect(targetRect); >- for (auto& tile : m_tiles.values()) >- textureMapper.drawNumber(repaintCount, borderColor, tile.rect().location(), adjustedTransform); >-} >- >-void CoordinatedBackingStore::commitTileOperations(TextureMapper& textureMapper) >-{ >- if (!m_pendingSize.isZero()) { >- m_size = m_pendingSize; >- m_pendingSize = FloatSize(); >- } >- >- for (auto& tileToRemove : m_tilesToRemove) >- m_tiles.remove(tileToRemove); >- m_tilesToRemove.clear(); >- >- for (auto& tile : m_tiles.values()) >- tile.swapBuffers(textureMapper); >-} >- >-} // namespace WebCore >-#endif // USE(COORDINATED_GRAPHICS) >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.h b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.h >deleted file mode 100644 >index 44d5cfdb494e179f2f577c3a37453cf3ee9cc93c..0000000000000000000000000000000000000000 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.h >+++ /dev/null >@@ -1,92 +0,0 @@ >-/* >- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) >- >- This library is free software; you can redistribute it and/or >- modify it under the terms of the GNU Library General Public >- License as published by the Free Software Foundation; either >- version 2 of the License, or (at your option) any later version. >- >- This library is distributed in the hope that it will be useful, >- but WITHOUT ANY WARRANTY; without even the implied warranty of >- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- Library General Public License for more details. >- >- You should have received a copy of the GNU Library General Public License >- along with this library; see the file COPYING.LIB. If not, write to >- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >- Boston, MA 02110-1301, USA. >- */ >- >-#ifndef CoordinatedBackingStore_h >-#define CoordinatedBackingStore_h >- >-#if USE(COORDINATED_GRAPHICS) >- >-#include <WebCore/TextureMapper.h> >-#include <WebCore/TextureMapperBackingStore.h> >-#include <WebCore/TextureMapperTile.h> >-#include <wtf/HashMap.h> >-#include <wtf/HashSet.h> >-#include <wtf/RefCounted.h> >- >-namespace Nicosia { >-class Buffer; >-} >- >-namespace WebKit { >- >-class CoordinatedBackingStoreTile : public WebCore::TextureMapperTile { >-public: >- explicit CoordinatedBackingStoreTile(float scale = 1) >- : WebCore::TextureMapperTile(WebCore::FloatRect()) >- , m_scale(scale) >- { >- } >- >- inline float scale() const { return m_scale; } >- void swapBuffers(WebCore::TextureMapper&); >- void setBackBuffer(const WebCore::IntRect&, const WebCore::IntRect&, RefPtr<Nicosia::Buffer>&&, const WebCore::IntPoint&); >- >-private: >- RefPtr<Nicosia::Buffer> m_buffer; >- WebCore::IntRect m_sourceRect; >- WebCore::IntRect m_tileRect; >- WebCore::IntPoint m_bufferOffset; >- float m_scale; >-}; >- >-class CoordinatedBackingStore : public RefCounted<CoordinatedBackingStore>, public WebCore::TextureMapperBackingStore { >-public: >- void createTile(uint32_t tileID, float); >- void removeTile(uint32_t tileID); >- void removeAllTiles(); >- void updateTile(uint32_t tileID, const WebCore::IntRect&, const WebCore::IntRect&, RefPtr<Nicosia::Buffer>&&, const WebCore::IntPoint&); >- static Ref<CoordinatedBackingStore> create() { return adoptRef(*new CoordinatedBackingStore); } >- void commitTileOperations(WebCore::TextureMapper&); >- void setSize(const WebCore::FloatSize&); >- void paintToTextureMapper(WebCore::TextureMapper&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&, float) override; >- void drawBorder(WebCore::TextureMapper&, const WebCore::Color&, float borderWidth, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override; >- void drawRepaintCounter(WebCore::TextureMapper&, int repaintCount, const WebCore::Color&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&) override; >- >-private: >- CoordinatedBackingStore() >- : m_scale(1.) >- { } >- void paintTilesToTextureMapper(Vector<WebCore::TextureMapperTile*>&, WebCore::TextureMapper&, const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&); >- WebCore::TransformationMatrix adjustedTransformForRect(const WebCore::FloatRect&); >- WebCore::FloatRect rect() const { return WebCore::FloatRect(WebCore::FloatPoint::zero(), m_size); } >- >- typedef HashMap<uint32_t, CoordinatedBackingStoreTile> CoordinatedBackingStoreTileMap; >- CoordinatedBackingStoreTileMap m_tiles; >- HashSet<uint32_t> m_tilesToRemove; >- // FIXME: m_pendingSize should be removed after the following bug is fixed: https://bugs.webkit.org/show_bug.cgi?id=108294 >- WebCore::FloatSize m_pendingSize; >- WebCore::FloatSize m_size; >- float m_scale; >-}; >- >-} // namespace WebKit >- >-#endif // USE(COORDINATED_GRAPHICS) >- >-#endif // CoordinatedBackingStore_h >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >index 5e335b23474bc471cc73fed17da47a10099ff184..fea28ea0b06f58fa38d3916081fcaaa1b3728e3c 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >@@ -24,7 +24,7 @@ > > #if USE(COORDINATED_GRAPHICS) > >-#include "CoordinatedBackingStore.h" >+#include <WebCore/CoordinatedBackingStore.h> > #include <WebCore/NicosiaBuffer.h> > #include <WebCore/TextureMapper.h> > #include <WebCore/TextureMapperBackingStore.h> >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h >index 49009d5ae329a87344de04b0d1d721d1186ee57b..2f3b4f339753fdc7ddcb711020396002a1a92afb 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h >@@ -49,13 +49,12 @@ class Buffer; > } > > namespace WebCore { >+class CoordinatedBackingStore; > class TextureMapperGL; > } > > namespace WebKit { > >-class CoordinatedBackingStore; >- > class CoordinatedGraphicsSceneClient { > public: > virtual ~CoordinatedGraphicsSceneClient() { } >@@ -93,8 +92,8 @@ private: > CommitScope(CommitScope&) = delete; > CommitScope& operator=(const CommitScope&) = delete; > >- Vector<RefPtr<CoordinatedBackingStore>> releasedImageBackings; >- HashSet<RefPtr<CoordinatedBackingStore>> backingStoresWithPendingBuffers; >+ Vector<RefPtr<WebCore::CoordinatedBackingStore>> releasedImageBackings; >+ HashSet<RefPtr<WebCore::CoordinatedBackingStore>> backingStoresWithPendingBuffers; > }; > > void setRootLayerID(WebCore::CoordinatedLayerID); >@@ -145,8 +144,8 @@ private: > > std::unique_ptr<WebCore::TextureMapper> m_textureMapper; > >- HashMap<WebCore::CoordinatedImageBackingID, RefPtr<CoordinatedBackingStore>> m_imageBackings; >- HashMap<WebCore::TextureMapperLayer*, RefPtr<CoordinatedBackingStore>> m_backingStores; >+ HashMap<WebCore::CoordinatedImageBackingID, RefPtr<WebCore::CoordinatedBackingStore>> m_imageBackings; >+ HashMap<WebCore::TextureMapperLayer*, RefPtr<WebCore::CoordinatedBackingStore>> m_backingStores; > > #if USE(COORDINATED_GRAPHICS_THREADED) > HashMap<WebCore::TextureMapperLayer*, RefPtr<WebCore::TextureMapperPlatformLayerProxy>> m_platformLayerProxies; >diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt >index b7ab0dd6879e880b84dc2c6db4f6d59bc5970fa6..38b600e2b83e8864b5b4eee8ffe3ccc6f5209ae9 100644 >--- a/Source/WebKit/SourcesGTK.txt >+++ b/Source/WebKit/SourcesGTK.txt >@@ -70,7 +70,6 @@ Shared/API/glib/WebKitHitTestResult.cpp @no-unify > Shared/API/glib/WebKitURIRequest.cpp @no-unify > Shared/API/glib/WebKitURIResponse.cpp @no-unify > >-Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp > Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp > Shared/CoordinatedGraphics/SimpleViewportController.cpp > >diff --git a/Source/WebKit/SourcesWPE.txt b/Source/WebKit/SourcesWPE.txt >index 47a2dcde138b74597e100638289d4094a55a5139..7584474f43be251299675f0defa0d27bd54cb286 100644 >--- a/Source/WebKit/SourcesWPE.txt >+++ b/Source/WebKit/SourcesWPE.txt >@@ -67,7 +67,6 @@ Shared/API/glib/WebKitHitTestResult.cpp @no-unify > Shared/API/glib/WebKitURIRequest.cpp @no-unify > Shared/API/glib/WebKitURIResponse.cpp @no-unify > >-Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp > Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp > Shared/CoordinatedGraphics/SimpleViewportController.cpp >
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 188158
: 346054 |
346071