Skip to content

Commit

Permalink
Merge r220521 - [TexMap] Remove GraphicsContext3D usage from BitmapTe…
Browse files Browse the repository at this point in the history
…xturePool

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):
  • Loading branch information
zdobersek authored and carlosgcampos committed Aug 17, 2017
1 parent f921998 commit 863b05e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
2017-08-10 Zan Dobersek <zdobersek@igalia.com>

[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 <zdobersek@igalia.com>

REGRESSION(r220517-r220521) [GTK] Various compositing tests fail
Expand Down
Expand Up @@ -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<GraphicsContext3D>&& context3D)
BitmapTexturePool::BitmapTexturePool(const TextureMapperContextAttributes& contextAttributes)
: m_contextAttributes(contextAttributes)
, m_context3D(WTFMove(context3D))
, m_releaseUnusedTexturesTimer(RunLoop::current(), this, &BitmapTexturePool::releaseUnusedTexturesTimerFired)
{
}
Expand Down
8 changes: 1 addition & 7 deletions Source/WebCore/platform/graphics/texmap/BitmapTexturePool.h
Expand Up @@ -32,21 +32,16 @@
#include <wtf/CurrentTime.h>
#include <wtf/RunLoop.h>

#if USE(TEXTURE_MAPPER_GL)
#include "GraphicsContext3D.h"
#endif

namespace WebCore {

class GraphicsContext3D;
class IntSize;

class BitmapTexturePool {
WTF_MAKE_NONCOPYABLE(BitmapTexturePool);
WTF_MAKE_FAST_ALLOCATED;
public:
#if USE(TEXTURE_MAPPER_GL)
explicit BitmapTexturePool(const TextureMapperContextAttributes&, RefPtr<GraphicsContext3D>&&);
explicit BitmapTexturePool(const TextureMapperContextAttributes&);
#endif

RefPtr<BitmapTexture> acquireTexture(const IntSize&, const BitmapTexture::Flags);
Expand All @@ -70,7 +65,6 @@ class BitmapTexturePool {

#if USE(TEXTURE_MAPPER_GL)
TextureMapperContextAttributes m_contextAttributes;
RefPtr<GraphicsContext3D> m_context3D;
#endif

Vector<Entry> m_textures;
Expand Down
Expand Up @@ -172,7 +172,7 @@ TextureMapperGL::TextureMapperGL()

m_data = new TextureMapperGLData(*m_context3D);
#if USE(TEXTURE_MAPPER_GL)
m_texturePool = std::make_unique<BitmapTexturePool>(m_contextAttributes, m_context3D.copyRef());
m_texturePool = std::make_unique<BitmapTexturePool>(m_contextAttributes);
#endif
}

Expand Down

0 comments on commit 863b05e

Please sign in to comment.