Skip to content
Permalink
Browse files
[CoordinatedGraphics] Remove COORDINATED_GRAPHICS_THREADED option
https://bugs.webkit.org/show_bug.cgi?id=195159

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-02-28
Reviewed by Don Olmstead.

.:

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Use COORDINATED_GRAPHICS instead.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBufferData::~ImageBufferData):
* platform/graphics/cairo/ImageBufferDataCairo.h:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h:
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
(Nicosia::GC3DLayer::swapBuffersIfNeeded):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
(WebCore::TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::~TextureMapperGC3DPlatformLayer):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxyProvider.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsIntoWindow const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

Source/WebKit:

Use COORDINATED_GRAPHICS instead.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/SimpleViewportController.cpp:
* Shared/CoordinatedGraphics/SimpleViewportController.h:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updatePreferences):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::sendViewportAttributesChanged):
(WebKit::WebPage::viewportPropertiesDidChange):
* WebProcess/gtk/WebProcessMainGtk.cpp:

Canonical link: https://commits.webkit.org/209497@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos authored and webkit-commit-queue committed Feb 28, 2019
1 parent b77018d commit 20baac10cf6caeb5900064d9deec8fde333f064a
Showing 43 changed files with 168 additions and 107 deletions.
@@ -1,3 +1,14 @@
2019-02-28 Carlos Garcia Campos <cgarcia@igalia.com>

[CoordinatedGraphics] Remove COORDINATED_GRAPHICS_THREADED option
https://bugs.webkit.org/show_bug.cgi?id=195159

Reviewed by Don Olmstead.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:

2019-02-26 Gabe Giosia <giosia@google.com>

Incorrect formatting around command in Readme.md
@@ -1,3 +1,49 @@
2019-02-28 Carlos Garcia Campos <cgarcia@igalia.com>

[CoordinatedGraphics] Remove COORDINATED_GRAPHICS_THREADED option
https://bugs.webkit.org/show_bug.cgi?id=195159

Reviewed by Don Olmstead.

Use COORDINATED_GRAPHICS instead.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBufferData::~ImageBufferData):
* platform/graphics/cairo/ImageBufferDataCairo.h:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h:
* platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp:
(Nicosia::GC3DLayer::swapBuffersIfNeeded):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
(WebCore::TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer):
(WebCore::TextureMapperGC3DPlatformLayer::~TextureMapperGC3DPlatformLayer):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxyProvider.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsIntoWindow const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):

2019-02-28 Myles C. Maxfield <mmaxfield@apple.com>

Locale names can be nullptr
@@ -1436,7 +1436,7 @@ class GraphicsContext3D : public RefCounted<GraphicsContext3D> {

GC3Duint m_texture { 0 };
GC3Duint m_fbo { 0 };
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
GC3Duint m_compositorTexture { 0 };
GC3Duint m_intermediateTexture { 0 };
#endif
@@ -35,7 +35,7 @@ namespace Nicosia {
class PlatformLayer;
}
typedef Nicosia::PlatformLayer PlatformLayer;
#elif USE(COORDINATED_GRAPHICS_THREADED)
#elif USE(COORDINATED_GRAPHICS)
namespace WebCore {
class TextureMapperPlatformLayerProxyProvider;
typedef TextureMapperPlatformLayerProxyProvider PlatformLayer;
@@ -69,7 +69,7 @@
#include "OpenGLShims.h"
#endif

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
#include "TextureMapperPlatformLayerBuffer.h"
#include "TextureMapperPlatformLayerProxy.h"
#endif
@@ -83,13 +83,13 @@ ImageBufferData::ImageBufferData(const IntSize& size, RenderingMode renderingMod
, m_size(size)
, m_renderingMode(renderingMode)
#if ENABLE(ACCELERATED_2D_CANVAS)
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
, m_compositorTexture(0)
#endif
, m_texture(0)
#endif
{
#if ENABLE(ACCELERATED_2D_CANVAS) && USE(COORDINATED_GRAPHICS_THREADED)
#if ENABLE(ACCELERATED_2D_CANVAS) && USE(COORDINATED_GRAPHICS)
if (m_renderingMode == RenderingMode::Accelerated) {
#if USE(NICOSIA)
m_nicosiaLayer = Nicosia::ContentLayer::create(Nicosia::ContentLayerTextureMapperImpl::createFactory(*this));
@@ -106,7 +106,7 @@ ImageBufferData::~ImageBufferData()
return;

#if ENABLE(ACCELERATED_2D_CANVAS)
#if USE(COORDINATED_GRAPHICS_THREADED) && USE(NICOSIA)
#if USE(COORDINATED_GRAPHICS) && USE(NICOSIA)
downcast<Nicosia::ContentLayerTextureMapperImpl>(m_nicosiaLayer->impl()).invalidateClient();
#endif

@@ -116,7 +116,7 @@ ImageBufferData::~ImageBufferData()
if (m_texture)
glDeleteTextures(1, &m_texture);

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
if (m_compositorTexture)
glDeleteTextures(1, &m_compositorTexture);
#endif
@@ -127,7 +127,7 @@ ImageBufferData::~ImageBufferData()
}

#if ENABLE(ACCELERATED_2D_CANVAS)
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
void ImageBufferData::createCompositorBuffer()
{
auto* context = PlatformDisplay::sharedDisplayForCompositing().sharingGLContext();
@@ -674,7 +674,7 @@ Vector<uint8_t> ImageBuffer::toData(const String& mimeType, Optional<double>) co

#endif

#if ENABLE(ACCELERATED_2D_CANVAS) && !USE(COORDINATED_GRAPHICS_THREADED)
#if ENABLE(ACCELERATED_2D_CANVAS) && !USE(COORDINATED_GRAPHICS)
void ImageBufferData::paintToTextureMapper(TextureMapper& textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)
{
ASSERT(m_texture);
@@ -69,7 +69,7 @@ class ImageBufferData
#if ENABLE(ACCELERATED_2D_CANVAS)
void createCairoGLSurface();

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
#if USE(NICOSIA)
void swapBuffersIfNeeded() override;
#else
@@ -29,7 +29,7 @@
#include "config.h"
#include "NicosiaPaintingEngineThreaded.h"

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "GraphicsContext.h"
#include "GraphicsLayer.h"
@@ -89,4 +89,4 @@ bool PaintingEngineThreaded::paint(GraphicsLayer& layer, Ref<Buffer>&& buffer, c

} // namespace Nicosia

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)
@@ -28,7 +28,7 @@

#pragma once

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "NicosiaPaintingEngine.h"
#include <wtf/WorkerPool.h>
@@ -48,4 +48,4 @@ class PaintingEngineThreaded final : public PaintingEngine {

} // namespace Nicosia

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)
@@ -31,7 +31,7 @@

#if USE(NICOSIA) && USE(TEXTURE_MAPPER)

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
#include "TextureMapperGL.h"
#include "TextureMapperPlatformLayerBuffer.h"
#include "TextureMapperPlatformLayerProxy.h"
@@ -76,7 +76,7 @@ PlatformGraphicsContext3D GC3DLayer::platformContext()

void GC3DLayer::swapBuffersIfNeeded()
{
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
if (m_context.layerComposited())
return;

@@ -196,7 +196,7 @@ bool GraphicsContext3D::reshapeFBOs(const IntSize& size)
::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0);
::glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture, 0);

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
if (m_compositorTexture) {
::glBindTexture(GL_TEXTURE_2D, m_compositorTexture);
::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0);
@@ -226,15 +226,15 @@ void GraphicsContext3D::prepareTexture()

makeContextCurrent();

#if !USE(COORDINATED_GRAPHICS_THREADED)
#if !USE(COORDINATED_GRAPHICS)
TemporaryOpenGLSetting scopedScissor(GL_SCISSOR_TEST, GL_FALSE);
TemporaryOpenGLSetting scopedDither(GL_DITHER, GL_FALSE);
#endif

if (m_attrs.antialias)
resolveMultisamplingIfNecessary();

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
std::swap(m_texture, m_compositorTexture);
std::swap(m_texture, m_intermediateTexture);
::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
@@ -110,7 +110,7 @@ bool GraphicsContext3D::reshapeFBOs(const IntSize& size)
::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, pixelDataType, 0);
::glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0);

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
if (m_compositorTexture) {
::glBindTexture(GL_TEXTURE_2D, m_compositorTexture);
::glTexImage2D(GL_TEXTURE_2D, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0);
@@ -133,7 +133,7 @@ GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, Hos
::glGenFramebuffers(1, &m_fbo);
::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
::glGenTextures(1, &m_compositorTexture);
::glBindTexture(GL_TEXTURE_2D, m_compositorTexture);
::glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -235,7 +235,7 @@ GraphicsContext3D::~GraphicsContext3D()
makeContextCurrent();
if (m_texture)
::glDeleteTextures(1, &m_texture);
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
if (m_compositorTexture)
::glDeleteTextures(1, &m_compositorTexture);
#endif
@@ -257,7 +257,7 @@ GraphicsContext3D::~GraphicsContext3D()
::glDeleteRenderbuffers(1, &m_depthStencilBuffer);
}
::glDeleteFramebuffers(1, &m_fbo);
#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
::glDeleteTextures(1, &m_intermediateTexture);
#endif

@@ -42,14 +42,14 @@ TextureMapperGC3DPlatformLayer::TextureMapperGC3DPlatformLayer(GraphicsContext3D
break;
}

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
m_platformLayerProxy = adoptRef(new TextureMapperPlatformLayerProxy());
#endif
}

TextureMapperGC3DPlatformLayer::~TextureMapperGC3DPlatformLayer()
{
#if !USE(COORDINATED_GRAPHICS_THREADED)
#if !USE(COORDINATED_GRAPHICS)
if (client())
client()->platformLayerWillBeDestroyed();
#endif
@@ -67,7 +67,7 @@ PlatformGraphicsContext3D TextureMapperGC3DPlatformLayer::platformContext()
return m_glContext->platformContext();
}

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
RefPtr<TextureMapperPlatformLayerProxy> TextureMapperGC3DPlatformLayer::proxy() const
{
return m_platformLayerProxy.copyRef();
@@ -115,7 +115,7 @@ void TextureMapperGC3DPlatformLayer::paintToTextureMapper(TextureMapper& texture
texmapGL.drawTexture(m_context.m_texture, flags, textureSize, targetRect, matrix, opacity);
#endif // USE(TEXTURE_MAPPER_GL)
}
#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)

} // namespace WebCore

@@ -39,7 +39,7 @@ class TextureMapperGC3DPlatformLayer : public PlatformLayer {
bool makeContextCurrent();
PlatformGraphicsContext3D platformContext();

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
RefPtr<TextureMapperPlatformLayerProxy> proxy() const override;
void swapBuffersIfNeeded() override;
#else
@@ -50,7 +50,7 @@ class TextureMapperGC3DPlatformLayer : public PlatformLayer {
GraphicsContext3D& m_context;
std::unique_ptr<GLContext> m_glContext;

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)
RefPtr<TextureMapperPlatformLayerProxy> m_platformLayerProxy;
#endif
};
@@ -26,7 +26,7 @@
#include "config.h"
#include "TextureMapperPlatformLayerBuffer.h"

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "FloatRect.h"
#include "NotImplemented.h"
@@ -92,4 +92,4 @@ void TextureMapperPlatformLayerBuffer::paintToTextureMapper(TextureMapper& textu

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)
@@ -25,7 +25,7 @@

#pragma once

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "BitmapTextureGL.h"
#include "TextureMapperGLHeaders.h"
@@ -88,4 +88,4 @@ class TextureMapperPlatformLayerBuffer : public TextureMapperPlatformLayer {

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)
@@ -26,7 +26,7 @@
#include "config.h"
#include "TextureMapperPlatformLayerProxy.h"

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "BitmapTextureGL.h"
#include "TextureMapperGL.h"
@@ -243,4 +243,4 @@ void TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired()

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)
@@ -23,10 +23,9 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef TextureMapperPlatformLayerProxy_h
#define TextureMapperPlatformLayerProxy_h
#pragma once

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

#include "TextureMapperGLHeaders.h"
#include <wtf/Function.h>
@@ -100,6 +99,4 @@ class TextureMapperPlatformLayerProxy : public ThreadSafeRefCounted<TextureMappe

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS_THREADED)

#endif // TextureMapperPlatformLayerProxy_h
#endif // USE(COORDINATED_GRAPHICS)
@@ -25,7 +25,7 @@

#pragma once

#if USE(COORDINATED_GRAPHICS_THREADED)
#if USE(COORDINATED_GRAPHICS)

namespace WebCore {

@@ -39,4 +39,4 @@ class TextureMapperPlatformLayerProxyProvider {

} // namespace WebCore

#endif // USE(COORDINATED_GRAPHICS_THREADED)
#endif // USE(COORDINATED_GRAPHICS)

0 comments on commit 20baac1

Please sign in to comment.