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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:00:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2d2f0c399c05402e978d2430c0e4c9c3e314b929
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Sep 4 00:36:42 2010 +0000

    2010-09-03  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [chromium] Null out Canvas2DLayerChromium's back reference to DrawingBuffer on destruction
            https://bugs.webkit.org/show_bug.cgi?id=45187
    
            Canvas2DLayerChromium keeps a back reference to a DrawingBuffer.  This has to be a raw pointer
            because the DrawingBuffer holds a RefPtr to the Canvas2DLayerChromium.  Since the layer can
            outlive the buffer, this back reference has to be explicitly cleared when the DrawingBuffer
            is destroyed.
    
            * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
            (WebCore::Canvas2DLayerChromium::setDrawingBuffer):
            * platform/graphics/chromium/Canvas2DLayerChromium.h:
            * platform/graphics/chromium/DrawingBufferChromium.cpp:
            (WebCore::DrawingBuffer::~DrawingBuffer):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66780 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 709650e..c8afbbb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-03  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Null out Canvas2DLayerChromium's back reference to DrawingBuffer on destruction
+        https://bugs.webkit.org/show_bug.cgi?id=45187
+
+        Canvas2DLayerChromium keeps a back reference to a DrawingBuffer.  This has to be a raw pointer
+        because the DrawingBuffer holds a RefPtr to the Canvas2DLayerChromium.  Since the layer can
+        outlive the buffer, this back reference has to be explicitly cleared when the DrawingBuffer
+        is destroyed.
+
+        * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
+        (WebCore::Canvas2DLayerChromium::setDrawingBuffer):
+        * platform/graphics/chromium/Canvas2DLayerChromium.h:
+        * platform/graphics/chromium/DrawingBufferChromium.cpp:
+        (WebCore::DrawingBuffer::~DrawingBuffer):
+
 2010-09-03  Kenneth Russell  <kbr at google.com>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp b/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
index 345c420..9826c3e 100644
--- a/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
+++ b/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
@@ -100,5 +100,13 @@ unsigned Canvas2DLayerChromium::textureId() const
     return m_textureId;
 }
 
+void Canvas2DLayerChromium::setDrawingBuffer(DrawingBuffer* drawingBuffer)
+{
+    if (drawingBuffer != m_drawingBuffer) {
+        m_drawingBuffer = drawingBuffer;
+        m_textureChanged = true;
+    }
+}
+
 }
 #endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h b/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
index 4693c0b..0031229 100644
--- a/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
+++ b/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
@@ -50,6 +50,7 @@ public:
 
     void setTextureChanged();
     unsigned textureId() const;
+    void setDrawingBuffer(DrawingBuffer*);
 
 private:
     explicit Canvas2DLayerChromium(DrawingBuffer*, GraphicsLayerChromium* owner);
diff --git a/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp b/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
index 8e6f103..720f8d6 100644
--- a/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
+++ b/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
@@ -79,6 +79,8 @@ DrawingBuffer::DrawingBuffer(SharedGraphicsContext3D* context, const IntSize& si
 
 DrawingBuffer::~DrawingBuffer()
 {
+    if (m_internal->platformLayer)
+        m_internal->platformLayer->setDrawingBuffer(0);
     m_context->deleteFramebuffer(m_framebuffer);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list