[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jamesr at google.com jamesr at google.com
Wed Dec 22 13:09:44 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit db58cd9ed0199a2927964aeb904a85cdbaae6737
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 7 23:37:29 2010 +0000

    2010-09-07  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            Fix compile errors in DrawingBuffer if USE(ACCELERATED_COMPOSITING) is not set
            https://bugs.webkit.org/show_bug.cgi?id=45324
    
            Adds appropriate #if guards around code that has to deal directly with the compositor.
            DrawingBuffer can still be used without the compositor as an off-screen rendering
            region.
    
            To test, compile without USE(ACCELERATED_COMPOSITING).
    
            * platform/graphics/chromium/DrawingBufferChromium.cpp:
            (WebCore::DrawingBuffer::~DrawingBuffer):
            (WebCore::DrawingBuffer::reset):
            * platform/graphics/gpu/DrawingBuffer.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66931 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 06d0a99..257a4b1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-07  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        Fix compile errors in DrawingBuffer if USE(ACCELERATED_COMPOSITING) is not set
+        https://bugs.webkit.org/show_bug.cgi?id=45324
+
+        Adds appropriate #if guards around code that has to deal directly with the compositor.
+        DrawingBuffer can still be used without the compositor as an off-screen rendering
+        region.
+
+        To test, compile without USE(ACCELERATED_COMPOSITING).
+
+        * platform/graphics/chromium/DrawingBufferChromium.cpp:
+        (WebCore::DrawingBuffer::~DrawingBuffer):
+        (WebCore::DrawingBuffer::reset):
+        * platform/graphics/gpu/DrawingBuffer.h:
+
 2010-09-03  Joseph Pecoraro  <joepeck at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp b/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
index 76c1570..89e8705 100644
--- a/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
+++ b/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
@@ -32,10 +32,13 @@
 
 #include "DrawingBuffer.h"
 
-#include "Canvas2DLayerChromium.h"
 #include "GraphicsContext3D.h"
 #include "SharedGraphicsContext3D.h"
 
+#if USE(ACCELERATED_COMPOSITING)
+#include "Canvas2DLayerChromium.h"
+#endif
+
 #include <GLES2/gl2.h>
 #ifndef GL_GLEXT_PROTOTYPES
 #define GL_GLEXT_PROTOTYPES 1
@@ -46,7 +49,9 @@ namespace WebCore {
 
 struct DrawingBufferInternal {
     unsigned offscreenColorTexture;
+#if USE(ACCELERATED_COMPOSITING)
     RefPtr<Canvas2DLayerChromium> platformLayer;
+#endif
 };
 
 static unsigned generateColorTexture(SharedGraphicsContext3D* context, const IntSize& size)
@@ -79,11 +84,14 @@ DrawingBuffer::DrawingBuffer(SharedGraphicsContext3D* context, const IntSize& si
 
 DrawingBuffer::~DrawingBuffer()
 {
+#if USE(ACCELERATED_COMPOSITING)
     if (m_internal->platformLayer)
         m_internal->platformLayer->setDrawingBuffer(0);
+#endif
     m_context->deleteFramebuffer(m_framebuffer);
 }
 
+#if USE(ACCELERATED_COMPOSITING)
 void DrawingBuffer::publishToPlatformLayer()
 {
     if (m_callback)
@@ -98,6 +106,7 @@ void DrawingBuffer::publishToPlatformLayer()
     glCopyTextureToParentTexture(m_internal->offscreenColorTexture, parentTexture);
     glFlush();
 }
+#endif
 
 void DrawingBuffer::reset(const IntSize& newSize)
 {
@@ -108,16 +117,20 @@ void DrawingBuffer::reset(const IntSize& newSize)
     m_context->bindFramebuffer(m_framebuffer);
     m_internal->offscreenColorTexture = generateColorTexture(m_context, m_size);
 
+#if USE(ACCELERATED_COMPOSITING)
     if (m_internal->platformLayer)
         m_internal->platformLayer->setTextureChanged();
+#endif
 }
 
+#if USE(ACCELERATED_COMPOSITING)
 PlatformLayer* DrawingBuffer::platformLayer()
 {
     if (!m_internal->platformLayer)
         m_internal->platformLayer = Canvas2DLayerChromium::create(this, 0);
     return m_internal->platformLayer.get();
 }
+#endif
 
 unsigned DrawingBuffer::getRenderingResultsAsTexture()
 {
diff --git a/WebCore/platform/graphics/gpu/DrawingBuffer.h b/WebCore/platform/graphics/gpu/DrawingBuffer.h
index 031867f..23e6f4a 100644
--- a/WebCore/platform/graphics/gpu/DrawingBuffer.h
+++ b/WebCore/platform/graphics/gpu/DrawingBuffer.h
@@ -52,12 +52,14 @@ public:
     ~DrawingBuffer();
 
     void reset(const IntSize&);
-    PlatformLayer* platformLayer();
-
     void bind();
-    void publishToPlatformLayer();
     IntSize size() const { return m_size; }
 
+#if USE(ACCELERATED_COMPOSITING)
+    PlatformLayer* platformLayer();
+    void publishToPlatformLayer();
+#endif
+
     unsigned getRenderingResultsAsTexture();
 
     class WillPublishCallback : public Noncopyable {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list