[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

commit-queue at webkit.org commit-queue at webkit.org
Fri Jan 21 15:17:08 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit af7741e13c33008840ab84cef592f714e45aaa56
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 10 20:29:25 2011 +0000

    2011-01-10  W. James MacLean  <wjmaclean at chromium.org>
    
            Reviewed by Kenneth Russell.
    
            [chromium] Enable reuse of RenderSurface for drawing.
            https://bugs.webkit.org/show_bug.cgi?id=51928
    
            Modifies RenderSurfaceChromium::prepareContentsTexture to avoid trying to 'reserve' a texture
            that is already reserved, should an attempt be made to re-select a previously drawn render surface
            in order to continue drawing to it. This use case appears when compositing into an offscreen texture.
    
            Covered by existing test (compositing/geometry/fixed-position.html) when offscreen compositing enabled.
    
            * platform/graphics/chromium/LayerTexture.h:
            (WebCore::LayerTexture::isReserved):
            * platform/graphics/chromium/RenderSurfaceChromium.cpp:
            (WebCore::RenderSurfaceChromium::prepareContentsTexture):
            * platform/graphics/chromium/TextureManager.cpp:
            (WebCore::TextureManager::isProtected):
            * platform/graphics/chromium/TextureManager.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index df1b29a..16528d9 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2011-01-10  W. James MacLean  <wjmaclean at chromium.org>
+
+        Reviewed by Kenneth Russell.
+
+        [chromium] Enable reuse of RenderSurface for drawing.
+        https://bugs.webkit.org/show_bug.cgi?id=51928
+
+        Modifies RenderSurfaceChromium::prepareContentsTexture to avoid trying to 'reserve' a texture
+        that is already reserved, should an attempt be made to re-select a previously drawn render surface
+        in order to continue drawing to it. This use case appears when compositing into an offscreen texture.
+
+        Covered by existing test (compositing/geometry/fixed-position.html) when offscreen compositing enabled.
+
+        * platform/graphics/chromium/LayerTexture.h:
+        (WebCore::LayerTexture::isReserved):
+        * platform/graphics/chromium/RenderSurfaceChromium.cpp:
+        (WebCore::RenderSurfaceChromium::prepareContentsTexture):
+        * platform/graphics/chromium/TextureManager.cpp:
+        (WebCore::TextureManager::isProtected):
+        * platform/graphics/chromium/TextureManager.h:
+
 2011-01-10  Carlos Garcia Campos  <cgarcia at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/Source/WebCore/platform/graphics/chromium/LayerTexture.h b/Source/WebCore/platform/graphics/chromium/LayerTexture.h
index 312adfa..711e687 100644
--- a/Source/WebCore/platform/graphics/chromium/LayerTexture.h
+++ b/Source/WebCore/platform/graphics/chromium/LayerTexture.h
@@ -48,6 +48,11 @@ public:
     bool isValid(const IntSize&, unsigned format);
     bool reserve(const IntSize&, unsigned format);
     void unreserve();
+    bool isReserved()
+    {
+        ASSERT(m_textureManager);
+        return m_textureManager->isProtected(m_token);
+    }
 
     void bindTexture();
     void framebufferTexture2D();
diff --git a/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp b/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp
index e8b9a12..696828f 100644
--- a/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp
+++ b/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.cpp
@@ -124,6 +124,9 @@ bool RenderSurfaceChromium::prepareContentsTexture()
     if (!m_contentsTexture)
         m_contentsTexture = LayerTexture::create(layerRenderer()->context(), textureManager);
 
+    if (m_contentsTexture->isReserved())
+        return true;
+
     if (!m_contentsTexture->reserve(requiredSize, GraphicsContext3D::RGBA)) {
         m_skipsDraw = true;
         return false;
diff --git a/Source/WebCore/platform/graphics/chromium/TextureManager.cpp b/Source/WebCore/platform/graphics/chromium/TextureManager.cpp
index 9579ef9..c4ad958 100644
--- a/Source/WebCore/platform/graphics/chromium/TextureManager.cpp
+++ b/Source/WebCore/platform/graphics/chromium/TextureManager.cpp
@@ -70,6 +70,11 @@ bool TextureManager::hasTexture(TextureToken token)
     return false;
 }
 
+bool TextureManager::isProtected(TextureToken token)
+{
+    return token && hasTexture(token) && m_textures.get(token).isProtected;
+}
+
 void TextureManager::protectTexture(TextureToken token)
 {
     ASSERT(hasTexture(token));
diff --git a/Source/WebCore/platform/graphics/chromium/TextureManager.h b/Source/WebCore/platform/graphics/chromium/TextureManager.h
index 1e850cd..4891cc7 100644
--- a/Source/WebCore/platform/graphics/chromium/TextureManager.h
+++ b/Source/WebCore/platform/graphics/chromium/TextureManager.h
@@ -51,6 +51,7 @@ public:
 
     void protectTexture(TextureToken);
     void unprotectTexture(TextureToken);
+    bool isProtected(TextureToken);
 
 private:
     TextureManager(GraphicsContext3D*, size_t memoryLimitBytes, int maxTextureSize);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list