Title: [152269] trunk/Source/WebCore
Revision
152269
Author
achristen...@apple.com
Date
2013-07-01 16:21:17 -0700 (Mon, 01 Jul 2013)

Log Message

DrawingBuffer constructor and destructor were not defined for Windows.
I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
https://bugs.webkit.org/show_bug.cgi?id=118262

Reviewed by Dean Jackson.

* platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
* platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152268 => 152269)


--- trunk/Source/WebCore/ChangeLog	2013-07-01 22:44:47 UTC (rev 152268)
+++ trunk/Source/WebCore/ChangeLog	2013-07-01 23:21:17 UTC (rev 152269)
@@ -1,5 +1,19 @@
 2013-07-01  Alex Christensen  <achristen...@apple.com>
 
+        DrawingBuffer constructor and destructor were not defined for Windows.
+        I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=118262
+
+        Reviewed by Dean Jackson.
+
+        * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
+        * platform/graphics/gpu/DrawingBuffer.cpp:
+        (WebCore::DrawingBuffer::DrawingBuffer):
+        (WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
+        * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.
+
+2013-07-01  Alex Christensen  <achristen...@apple.com>
+
         Fixed unreachable return when GLX or EGL are used with WebGL.
         https://bugs.webkit.org/show_bug.cgi?id=118263
 

Modified: trunk/Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp (152268 => 152269)


--- trunk/Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp	2013-07-01 22:44:47 UTC (rev 152268)
+++ trunk/Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp	2013-07-01 23:21:17 UTC (rev 152269)
@@ -33,56 +33,6 @@
 
 namespace WebCore {
 
-DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,
-                             const IntSize& size,
-                             bool multisampleExtensionSupported,
-                             bool packedDepthStencilExtensionSupported,
-                             PreserveDrawingBuffer preserveDrawingBuffer,
-                             AlphaRequirement alpha)
-    : m_preserveDrawingBuffer(preserveDrawingBuffer)
-    , m_alpha(alpha)
-    , m_scissorEnabled(false)
-    , m_texture2DBinding(0)
-    , m_framebufferBinding(0)
-    , m_activeTextureUnit(GraphicsContext3D::TEXTURE0)
-    , m_context(context)
-    , m_size(-1, -1)
-    , m_multisampleExtensionSupported(multisampleExtensionSupported)
-    , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported)
-    , m_fbo(context->createFramebuffer())
-    , m_colorBuffer(0)
-    , m_frontColorBuffer(0)
-    , m_separateFrontTexture(false)
-    , m_depthStencilBuffer(0)
-    , m_depthBuffer(0)
-    , m_stencilBuffer(0)
-    , m_multisampleFBO(0)
-    , m_multisampleColorBuffer(0)
-{
-    ASSERT(m_fbo);
-    if (!m_fbo) {
-        clear();
-        return;
-    }
-        
-    // create a texture to render into
-    m_colorBuffer = context->createTexture();
-    context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);
-    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);
-    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);
-    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);
-    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);
-    context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);
-    
-    createSecondaryBuffers();
-    reset(size);
-}
-
-DrawingBuffer::~DrawingBuffer()
-{
-    clear();
-}
-
 #if USE(ACCELERATED_COMPOSITING)
 
 unsigned DrawingBuffer::frontColorBuffer() const

Modified: trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp (152268 => 152269)


--- trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp	2013-07-01 22:44:47 UTC (rev 152268)
+++ trunk/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp	2013-07-01 23:21:17 UTC (rev 152269)
@@ -40,6 +40,53 @@
 
 namespace WebCore {
 
+#if PLATFORM(WIN) || PLATFORM(QT) || USE(CAIRO)
+DrawingBuffer::DrawingBuffer(GraphicsContext3D* context, const IntSize& size, bool multisampleExtensionSupported, bool packedDepthStencilExtensionSupported, PreserveDrawingBuffer preserveDrawingBuffer, AlphaRequirement alpha)
+    : m_preserveDrawingBuffer(preserveDrawingBuffer)
+    , m_alpha(alpha)
+    , m_scissorEnabled(false)
+    , m_texture2DBinding(0)
+    , m_framebufferBinding(0)
+    , m_activeTextureUnit(GraphicsContext3D::TEXTURE0)
+    , m_context(context)
+    , m_size(-1, -1)
+    , m_multisampleExtensionSupported(multisampleExtensionSupported)
+    , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported)
+    , m_fbo(context->createFramebuffer())
+    , m_colorBuffer(0)
+    , m_frontColorBuffer(0)
+    , m_separateFrontTexture(false)
+    , m_depthStencilBuffer(0)
+    , m_depthBuffer(0)
+    , m_stencilBuffer(0)
+    , m_multisampleFBO(0)
+    , m_multisampleColorBuffer(0)
+{
+    ASSERT(m_fbo);
+    if (!m_fbo) {
+        clear();
+        return;
+    }
+
+    // create a texture to render into
+    m_colorBuffer = context->createTexture();
+    context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);
+    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);
+    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);
+    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);
+    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);
+    context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);
+
+    createSecondaryBuffers();
+    reset(size);
+}
+
+DrawingBuffer::~DrawingBuffer()
+{
+    clear();
+}
+#endif
+
 // Global resource ceiling (expressed in terms of pixels) for DrawingBuffer creation and resize.
 // When this limit is set, DrawingBuffer::create() and DrawingBuffer::reset() calls that would
 // exceed the global cap will instead clear the buffer.

Modified: trunk/Source/WebCore/platform/graphics/gpu/qt/DrawingBufferQt.cpp (152268 => 152269)


--- trunk/Source/WebCore/platform/graphics/gpu/qt/DrawingBufferQt.cpp	2013-07-01 22:44:47 UTC (rev 152268)
+++ trunk/Source/WebCore/platform/graphics/gpu/qt/DrawingBufferQt.cpp	2013-07-01 23:21:17 UTC (rev 152269)
@@ -31,56 +31,6 @@
 
 namespace WebCore {
 
-DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,
-                             const IntSize& size,
-                             bool multisampleExtensionSupported,
-                             bool packedDepthStencilExtensionSupported,
-                             PreserveDrawingBuffer preserveDrawingBuffer,
-                             AlphaRequirement alpha)
-    : m_preserveDrawingBuffer(preserveDrawingBuffer)
-    , m_alpha(alpha)
-    , m_scissorEnabled(false)
-    , m_texture2DBinding(0)
-    , m_framebufferBinding(0)
-    , m_activeTextureUnit(GraphicsContext3D::TEXTURE0)
-    , m_context(context)
-    , m_size(-1, -1)
-    , m_multisampleExtensionSupported(multisampleExtensionSupported)
-    , m_packedDepthStencilExtensionSupported(packedDepthStencilExtensionSupported)
-    , m_fbo(context->createFramebuffer())
-    , m_colorBuffer(0)
-    , m_frontColorBuffer(0)
-    , m_separateFrontTexture(false)
-    , m_depthStencilBuffer(0)
-    , m_depthBuffer(0)
-    , m_stencilBuffer(0)
-    , m_multisampleFBO(0)
-    , m_multisampleColorBuffer(0)
-{
-    ASSERT(m_fbo);
-    if (!m_fbo) {
-        clear();
-        return;
-    }
-
-    // create a texture to render into
-    m_colorBuffer = context->createTexture();
-    context->bindTexture(GraphicsContext3D::TEXTURE_2D, m_colorBuffer);
-    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MAG_FILTER, GraphicsContext3D::LINEAR);
-    context->texParameterf(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_MIN_FILTER, GraphicsContext3D::LINEAR);
-    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_S, GraphicsContext3D::CLAMP_TO_EDGE);
-    context->texParameteri(GraphicsContext3D::TEXTURE_2D, GraphicsContext3D::TEXTURE_WRAP_T, GraphicsContext3D::CLAMP_TO_EDGE);
-    context->bindTexture(GraphicsContext3D::TEXTURE_2D, 0);
-
-    createSecondaryBuffers();
-    reset(size);
-}
-
-DrawingBuffer::~DrawingBuffer()
-{
-    clear();
-}
-
 #if USE(ACCELERATED_COMPOSITING)
 PlatformLayer* DrawingBuffer::platformLayer()
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to