- Revision
- 220400
- Author
- zandober...@gmail.com
- Date
- 2017-08-08 06:05:22 -0700 (Tue, 08 Aug 2017)
Log Message
[TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
https://bugs.webkit.org/show_bug.cgi?id=175314
Reviewed by Carlos Garcia Campos.
Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
types provided in the GraphicsTypes3D.h header.
No new tests -- no change in behavior.
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
(WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (220399 => 220400)
--- trunk/Source/WebCore/ChangeLog 2017-08-08 13:04:40 UTC (rev 220399)
+++ trunk/Source/WebCore/ChangeLog 2017-08-08 13:05:22 UTC (rev 220400)
@@ -1,5 +1,26 @@
2017-08-08 Zan Dobersek <zdober...@igalia.com>
+ [TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
+ https://bugs.webkit.org/show_bug.cgi?id=175314
+
+ Reviewed by Carlos Garcia Campos.
+
+ Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
+ TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
+ types provided in the GraphicsTypes3D.h header.
+
+ No new tests -- no change in behavior.
+
+ * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
+ (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
+ (WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):
+ * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
+ * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
+ (WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
+ * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
+
+2017-08-08 Zan Dobersek <zdober...@igalia.com>
+
[TexMap] Don't use GraphicsContext3D in ClipStack
https://bugs.webkit.org/show_bug.cgi?id=174776
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp (220399 => 220400)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp 2017-08-08 13:04:40 UTC (rev 220399)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp 2017-08-08 13:05:22 UTC (rev 220400)
@@ -38,7 +38,7 @@
{
}
-TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize& size, TextureMapperGL::Flags flags, GC3Dint internalFormat)
+TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize& size, TextureMapperGL::Flags flags, GLint internalFormat)
: m_textureID(textureID)
, m_size(size)
, m_internalFormat(internalFormat)
@@ -47,9 +47,9 @@
{
}
-bool TextureMapperPlatformLayerBuffer::canReuseWithoutReset(const IntSize& size, GC3Dint internalFormat)
+bool TextureMapperPlatformLayerBuffer::canReuseWithoutReset(const IntSize& size, GLint internalFormat)
{
- return m_texture && (m_texture->size() == size) && (static_cast<BitmapTextureGL*>(m_texture.get())->internalFormat() == internalFormat || internalFormat == GraphicsContext3D::DONT_CARE);
+ return m_texture && (m_texture->size() == size) && (static_cast<BitmapTextureGL*>(m_texture.get())->internalFormat() == internalFormat || internalFormat == GL_DONT_CARE);
}
std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerBuffer::clone(TextureMapperGL& texmapGL)
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h (220399 => 220400)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h 2017-08-08 13:04:40 UTC (rev 220399)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h 2017-08-08 13:05:22 UTC (rev 220400)
@@ -26,7 +26,7 @@
#pragma once
#include "BitmapTextureGL.h"
-#include "GraphicsTypes3D.h"
+#include "TextureMapperGLHeaders.h"
#include "TextureMapperPlatformLayer.h"
#include <wtf/CurrentTime.h>
@@ -39,13 +39,13 @@
WTF_MAKE_FAST_ALLOCATED();
public:
TextureMapperPlatformLayerBuffer(RefPtr<BitmapTexture>&&, TextureMapperGL::Flags = 0);
- TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize&, TextureMapperGL::Flags, GC3Dint internalFormat);
+ TextureMapperPlatformLayerBuffer(GLuint textureID, const IntSize&, TextureMapperGL::Flags, GLint internalFormat);
virtual ~TextureMapperPlatformLayerBuffer() = default;
void paintToTextureMapper(TextureMapper&, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) final;
- bool canReuseWithoutReset(const IntSize&, GC3Dint internalFormat);
+ bool canReuseWithoutReset(const IntSize&, GLint internalFormat);
BitmapTextureGL& textureGL() { return static_cast<BitmapTextureGL&>(*m_texture); }
inline void markUsed() { m_timeLastUsed = monotonicallyIncreasingTime(); }
@@ -72,7 +72,7 @@
GLuint m_textureID;
IntSize m_size;
- GC3Dint m_internalFormat;
+ GLint m_internalFormat;
TextureMapperGL::Flags m_extraFlags;
bool m_hasManagedTexture;
std::unique_ptr<UnmanagedBufferDataHolder> m_unmanagedBufferDataHolder;
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (220399 => 220400)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp 2017-08-08 13:04:40 UTC (rev 220399)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp 2017-08-08 13:05:22 UTC (rev 220400)
@@ -117,7 +117,7 @@
m_compositor->onNewBufferAvailable();
}
-std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProxy::getAvailableBuffer(const IntSize& size, GC3Dint internalFormat)
+std::unique_ptr<TextureMapperPlatformLayerBuffer> TextureMapperPlatformLayerProxy::getAvailableBuffer(const IntSize& size, GLint internalFormat)
{
ASSERT(m_lock.isHeld());
ASSERT(m_compositorThreadID == WTF::currentThread());
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h (220399 => 220400)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h 2017-08-08 13:04:40 UTC (rev 220399)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.h 2017-08-08 13:05:22 UTC (rev 220400)
@@ -28,7 +28,7 @@
#if USE(COORDINATED_GRAPHICS_THREADED)
-#include "GraphicsTypes3D.h"
+#include "TextureMapperGLHeaders.h"
#include <wtf/Function.h>
#include <wtf/Lock.h>
#include <wtf/RunLoop.h>
@@ -62,7 +62,7 @@
// the implementation of TextureMapperPlatformLayerProxyProvider should
// aquire / release the lock explicitly to use below methods.
Lock& lock() { return m_lock; }
- std::unique_ptr<TextureMapperPlatformLayerBuffer> getAvailableBuffer(const IntSize&, GC3Dint internalFormat);
+ std::unique_ptr<TextureMapperPlatformLayerBuffer> getAvailableBuffer(const IntSize&, GLint internalFormat);
void pushNextBuffer(std::unique_ptr<TextureMapperPlatformLayerBuffer>);
bool isActive();