WebKit Bugzilla
Attachment 346699 Details for
Bug 188348
: [Nicosia] Add Nicosia::CompositionLayerTextureMapperImpl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-188348-20180807110758.patch (text/plain), 9.71 KB, created by
Zan Dobersek
on 2018-08-07 02:07:59 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-08-07 02:07:59 PDT
Size:
9.71 KB
patch
obsolete
>Subversion Revision: 234643 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 71f5907c991f81e4c2f672c0e9bee266547254cc..90d7a2b52f910a4a555a5c18cf9c497200c3f8a3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,33 @@ >+2018-08-07 Zan Dobersek <zdobersek@igalia.com> >+ >+ [Nicosia] Add Nicosia::CompositionLayerTextureMapperImpl >+ https://bugs.webkit.org/show_bug.cgi?id=188348 >+ >+ Reviewed by Carlos Garcia Campos. >+ >+ Add the Nicosia::CompositionLayerTextureMapperImpl class, the >+ TextureMapper-specific implementation that will extend the >+ CompositionLayer class. >+ >+ The important deatil of this implementation is the TextureMapperLayer >+ object that's expected to be managed by the composition controller. As >+ such, it is placed inside the CompositionState struct to clearly >+ indicate its utility and expected place of management. In the current >+ setup, this place would be the CoordinatedGraphicsScene class. >+ >+ The Nicosia::CompositionLayer object that's spawned for each >+ CoordinatedGraphicsLayer instance is now switched to using the >+ CompositionLayerTextureMapperImpl object, with the local temporary no-op >+ CompositionLayer::Impl class removed. >+ >+ * platform/TextureMapper.cmake: >+ * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: Added. >+ (Nicosia::CompositionLayerTextureMapperImpl::createFactory): >+ * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h: Added. >+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: >+ (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): >+ (): Deleted. >+ > 2018-08-07 Zan Dobersek <zdobersek@igalia.com> > > [Nicosia] Add the TextureMapper-specific ContentLayer::Impl derivative >diff --git a/Source/WebCore/platform/TextureMapper.cmake b/Source/WebCore/platform/TextureMapper.cmake >index 0e15657c17ab74b4883d3d0209823990bf195788..09dea6794a25c06084252111b02f7d2d35e0317d 100644 >--- a/Source/WebCore/platform/TextureMapper.cmake >+++ b/Source/WebCore/platform/TextureMapper.cmake >@@ -44,6 +44,7 @@ if (USE_COORDINATED_GRAPHICS) > list(APPEND WebCore_INCLUDE_DIRECTORIES > "${WEBCORE_DIR}/platform/graphics/nicosia" > "${WEBCORE_DIR}/platform/graphics/nicosia/cairo" >+ "${WEBCORE_DIR}/platform/graphics/nicosia/texmap" > ) > list(APPEND WebCore_SOURCES > platform/graphics/nicosia/NicosiaBuffer.cpp >@@ -57,6 +58,7 @@ if (USE_COORDINATED_GRAPHICS) > platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp > platform/graphics/nicosia/cairo/NicosiaPaintingContextCairo.cpp > >+ platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp > platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp > ) > else () >diff --git a/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp b/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..38fdd93da6b13883140591653cdf29e07de32396 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp >@@ -0,0 +1,51 @@ >+/* >+ * Copyright (C) 2018 Metrological Group B.V. >+ * Copyright (C) 2018 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following >+ * disclaimer in the documentation and/or other materials provided >+ * with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "NicosiaCompositionLayerTextureMapperImpl.h" >+ >+#if USE(TEXTURE_MAPPER) >+ >+#include "TextureMapperLayer.h" >+ >+namespace Nicosia { >+ >+auto CompositionLayerTextureMapperImpl::createFactory() -> Factory >+{ >+ return Factory( >+ [](uint64_t, CompositionLayer&) { >+ return std::make_unique<CompositionLayerTextureMapperImpl>(); >+ }); >+} >+ >+CompositionLayerTextureMapperImpl::CompositionLayerTextureMapperImpl() = default; >+CompositionLayerTextureMapperImpl::~CompositionLayerTextureMapperImpl() = default; >+ >+} // namespace Nicosia >+ >+#endif // USE(TEXTURE_MAPPER) >diff --git a/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h b/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6555bfb080261e8a3095bde483a061bb54214574 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h >@@ -0,0 +1,63 @@ >+/* >+ * Copyright (C) 2018 Metrological Group B.V. >+ * Copyright (C) 2018 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following >+ * disclaimer in the documentation and/or other materials provided >+ * with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if USE(TEXTURE_MAPPER) >+ >+#include "NicosiaPlatformLayer.h" >+#include <memory> >+ >+namespace WebCore { >+class TextureMapperLayer; >+} >+ >+namespace Nicosia { >+ >+class CompositionLayerTextureMapperImpl final : public CompositionLayer::Impl { >+public: >+ static Factory createFactory(); >+ >+ CompositionLayerTextureMapperImpl(); >+ virtual ~CompositionLayerTextureMapperImpl(); >+ bool isTextureMapperImpl() const override { return true; } >+ >+ struct CompositionState { >+ std::unique_ptr<WebCore::TextureMapperLayer> layer; >+ }; >+ CompositionState& compositionState() { return m_compositionState; } >+ >+private: >+ CompositionState m_compositionState; >+}; >+ >+} // namespace Nicosia >+ >+SPECIALIZE_TYPE_TRAITS_NICOSIA_COMPOSITIONLAYER_IMPL(CompositionLayerTextureMapperImpl, isTextureMapperImpl()); >+ >+#endif // USE(TEXTURE_MAPPER) >diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >index 36d841f3f4a159b493c0808b34a5e295d7673c73..abaa71c46eb143502b3085c7d6830cf18f8e4375 100644 >--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp >@@ -30,6 +30,7 @@ > #include "GraphicsContext.h" > #include "GraphicsLayer.h" > #include "GraphicsLayerFactory.h" >+#include "NicosiaCompositionLayerTextureMapperImpl.h" > #include "NicosiaPaintingEngine.h" > #include "ScrollableArea.h" > #include "TextureMapperPlatformLayerProxyProvider.h" >@@ -121,13 +122,6 @@ void CoordinatedGraphicsLayer::didChangeGeometry() > setShouldUpdateVisibleRect(); > } > >-// FIXME: this is a temporary helper class to keep Nicosia::CompositionLayer creation working. >-class CompositionLayerNoopImpl final : public Nicosia::CompositionLayer::Impl { >-public: >- CompositionLayerNoopImpl() = default; >- virtual ~CompositionLayerNoopImpl() = default; >-}; >- > CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(Type layerType, GraphicsLayerClient& client) > : GraphicsLayer(layerType, client) > #ifndef NDEBUG >@@ -155,10 +149,7 @@ CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(Type layerType, GraphicsLayer > m_id = nextLayerID++; > > m_nicosia.layer = Nicosia::CompositionLayer::create(m_id, >- [](uint64_t, Nicosia::CompositionLayer&) >- { >- return std::make_unique<CompositionLayerNoopImpl>(); >- }); >+ Nicosia::CompositionLayerTextureMapperImpl::createFactory()); > } > > CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer()
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 188348
:
346632
| 346699