From 863b05e0f2514f7bf678740090e2c5718beb84e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20Dober=C5=A1ek?= Date: Thu, 17 Aug 2017 06:08:41 +0000 Subject: [PATCH] Merge r220521 - [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool https://bugs.webkit.org/show_bug.cgi?id=175319 Reviewed by Carlos Garcia Campos. Drop the GraphicsContext3D reference in BitmapTexturePool now that the BitmapTextureGL doesn't require it anymore. No new tests -- no change in behavior. * platform/graphics/texmap/BitmapTexturePool.cpp: (WebCore::BitmapTexturePool::BitmapTexturePool): * platform/graphics/texmap/BitmapTexturePool.h: * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): --- Source/WebCore/ChangeLog | 18 ++++++++++++++++++ .../graphics/texmap/BitmapTexturePool.cpp | 3 +-- .../graphics/texmap/BitmapTexturePool.h | 8 +------- .../graphics/texmap/TextureMapperGL.cpp | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 15d0a3c33f10..e89afcaa1b6c 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,21 @@ +2017-08-10 Zan Dobersek + + [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool + https://bugs.webkit.org/show_bug.cgi?id=175319 + + Reviewed by Carlos Garcia Campos. + + Drop the GraphicsContext3D reference in BitmapTexturePool now + that the BitmapTextureGL doesn't require it anymore. + + No new tests -- no change in behavior. + + * platform/graphics/texmap/BitmapTexturePool.cpp: + (WebCore::BitmapTexturePool::BitmapTexturePool): + * platform/graphics/texmap/BitmapTexturePool.h: + * platform/graphics/texmap/TextureMapperGL.cpp: + (WebCore::TextureMapperGL::TextureMapperGL): + 2017-08-14 Zan Dobersek REGRESSION(r220517-r220521) [GTK] Various compositing tests fail diff --git a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp index a41d0c9e5c5f..12c9d0651bbb 100644 --- a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp +++ b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp @@ -37,9 +37,8 @@ static const double releaseUnusedSecondsTolerance = 3; static const Seconds releaseUnusedTexturesTimerInterval { 500_ms }; #if USE(TEXTURE_MAPPER_GL) -BitmapTexturePool::BitmapTexturePool(const TextureMapperContextAttributes& contextAttributes, RefPtr&& context3D) +BitmapTexturePool::BitmapTexturePool(const TextureMapperContextAttributes& contextAttributes) : m_contextAttributes(contextAttributes) - , m_context3D(WTFMove(context3D)) , m_releaseUnusedTexturesTimer(RunLoop::current(), this, &BitmapTexturePool::releaseUnusedTexturesTimerFired) { } diff --git a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h index 897f5c2eaa9f..31caff74ff8d 100644 --- a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h +++ b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h @@ -32,13 +32,8 @@ #include #include -#if USE(TEXTURE_MAPPER_GL) -#include "GraphicsContext3D.h" -#endif - namespace WebCore { -class GraphicsContext3D; class IntSize; class BitmapTexturePool { @@ -46,7 +41,7 @@ class BitmapTexturePool { WTF_MAKE_FAST_ALLOCATED; public: #if USE(TEXTURE_MAPPER_GL) - explicit BitmapTexturePool(const TextureMapperContextAttributes&, RefPtr&&); + explicit BitmapTexturePool(const TextureMapperContextAttributes&); #endif RefPtr acquireTexture(const IntSize&, const BitmapTexture::Flags); @@ -70,7 +65,6 @@ class BitmapTexturePool { #if USE(TEXTURE_MAPPER_GL) TextureMapperContextAttributes m_contextAttributes; - RefPtr m_context3D; #endif Vector m_textures; diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp index 39bea27b50f7..15ed70a5b6b8 100644 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp @@ -172,7 +172,7 @@ TextureMapperGL::TextureMapperGL() m_data = new TextureMapperGLData(*m_context3D); #if USE(TEXTURE_MAPPER_GL) - m_texturePool = std::make_unique(m_contextAttributes, m_context3D.copyRef()); + m_texturePool = std::make_unique(m_contextAttributes); #endif }