Title: [91736] trunk/Source
Revision
91736
Author
[email protected]
Date
2011-07-25 18:18:07 -0700 (Mon, 25 Jul 2011)

Log Message

Source/WebCore: Removed support for the GL_latch_CHROMIUM extension which Chromium no longer supports.
Replaced calls to SetLatch with calls to Flush since Flush now has barrier semantics in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=65043

Patch by Al Patrick <[email protected]> on 2011-07-25
Reviewed by James Robinson.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::publishToPlatformLayer):
* platform/graphics/chromium/Extensions3DChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::drawLayers):
(WebCore::LayerRendererChromium::addChildContext):
(WebCore::LayerRendererChromium::removeChildContext):
* platform/graphics/chromium/LayerRendererChromium.h:

Source/WebKit/chromium: Removed support for the GL_latch_CHROMIUM extension which Chromium no longer supports.
https://bugs.webkit.org/show_bug.cgi?id=65043

Patch by Al Patrick <[email protected]> on 2011-07-25
Reviewed by James Robinson.

* public/WebGraphicsContext3D.h:
* src/Extensions3DChromium.cpp:
* src/GraphicsContext3DChromium.cpp:
* src/GraphicsContext3DInternal.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91735 => 91736)


--- trunk/Source/WebCore/ChangeLog	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/ChangeLog	2011-07-26 01:18:07 UTC (rev 91736)
@@ -1,3 +1,23 @@
+2011-07-25  Al Patrick  <[email protected]>
+
+        Removed support for the GL_latch_CHROMIUM extension which Chromium no longer supports.
+        Replaced calls to SetLatch with calls to Flush since Flush now has barrier semantics in Chromium.
+        https://bugs.webkit.org/show_bug.cgi?id=65043
+
+        Reviewed by James Robinson.
+
+        * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
+        (WebCore::Canvas2DLayerChromium::updateCompositorResources):
+        * platform/graphics/chromium/DrawingBufferChromium.cpp:
+        (WebCore::DrawingBuffer::publishToPlatformLayer):
+        * platform/graphics/chromium/Extensions3DChromium.h:
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::LayerRendererChromium):
+        (WebCore::LayerRendererChromium::drawLayers):
+        (WebCore::LayerRendererChromium::addChildContext):
+        (WebCore::LayerRendererChromium::removeChildContext):
+        * platform/graphics/chromium/LayerRendererChromium.h:
+
 2011-07-25  Sam Weinig  <[email protected]>
 
         Refactor ScrollableArea pinned predicates to be more generally useful

Modified: trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp (91735 => 91736)


--- trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp	2011-07-26 01:18:07 UTC (rev 91736)
@@ -88,12 +88,10 @@
         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);
         m_textureChanged = false;
-        // FIXME: The finish() here is required because we have to make sure that the texture created in this
+        // The flush() here is required because we have to make sure that the texture created in this
         // context (the compositor context) is actually created by the service side before the child context
-        // attempts to use it (in publishToPlatformLayer).  finish() is currently the only call with strong
-        // enough semantics to promise this, but is actually much stronger.  Ideally we'd do something like
-        // inserting a fence here and waiting for it before trying to publish.
-        context->finish();
+        // attempts to use it (in publishToPlatformLayer).
+        context->flush();
     }
     // Update the contents of the texture used by the compositor.
     if (m_contentsDirty) {

Modified: trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp (91735 => 91736)


--- trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp	2011-07-26 01:18:07 UTC (rev 91736)
@@ -114,7 +114,7 @@
 {
     if (!m_context)
         return;
-        
+
     if (m_callback)
         m_callback->willPublish();
     if (multisample())
@@ -122,8 +122,7 @@
     unsigned parentTexture = m_platformLayer->textureId();
     // We do the copy in the canvas' (child) context so that it executes in the correct order relative to
     // other commands in the child context. This ensures that the parent texture always contains a complete
-    // frame and not some intermediate result. LayerRendererChromium uses glSetLatch to make sure the child
-    // context completes before the parent context consumes the texture.
+    // frame and not some intermediate result.
     m_context->makeContextCurrent();
 #if USE(SKIA)
     if (m_grContext)

Modified: trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h (91735 => 91736)


--- trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h	2011-07-26 01:18:07 UTC (rev 91736)
@@ -41,7 +41,6 @@
     //   GL_CHROMIUM_strict_attribs : indicating a GL error is generated for out-of-bounds buffer accesses.
     //   GL_CHROMIUM_map_sub
     //   GL_CHROMIUM_copy_texture_to_parent_texture
-    //   GL_CHROMIUM_latch
     //   GL_CHROMIUM_swapbuffers_complete_callback
     //   GL_CHROMIUM_rate_limit_offscreen_context
 
@@ -72,12 +71,6 @@
     // GL_CHROMIUM_copy_texture_to_parent_texture
     void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture);
 
-    // GL_CHROMIUM_latch
-    void getParentToChildLatchCHROMIUM(GC3Duint* latchId);
-    void getChildToParentLatchCHROMIUM(GC3Duint* latchId);
-    void waitLatchCHROMIUM(GC3Duint latchId);
-    void setLatchCHROMIUM(GC3Duint latchId);
-
     // GL_CHROMIUM_swapbuffers_complete_callback
     class SwapBuffersCompleteCallbackCHROMIUM {
     public:

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (91735 => 91736)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-07-26 01:18:07 UTC (rev 91736)
@@ -132,14 +132,12 @@
     , m_offscreenFramebufferId(0)
     , m_compositeOffscreen(false)
     , m_context(context)
-    , m_contextSupportsLatch(false)
     , m_contextSupportsTextureFormatBGRA(false)
     , m_contextSupportsReadFormatBGRA(false)
     , m_animating(false)
     , m_defaultRenderSurface(0)
 {
     WebCore::Extensions3D* extensions = m_context->getExtensions();
-    m_contextSupportsLatch = extensions->supports("GL_CHROMIUM_latch");
     m_contextSupportsMapSub = extensions->supports("GL_CHROMIUM_map_sub");
     if (m_contextSupportsMapSub)
         extensions->ensureEnabled("GL_CHROMIUM_map_sub");
@@ -285,24 +283,15 @@
     ASSERT(m_hardwareCompositing);
     ASSERT(m_computedRenderSurfaceLayerList);
     // Before drawLayers:
-    if (hardwareCompositing() && m_contextSupportsLatch) {
+    if (hardwareCompositing()) {
         // FIXME: The multithreaded compositor case will not work as long as
         // copyTexImage2D resolves to the parent texture, because the main
         // thread can execute WebGL calls on the child context at any time,
         // potentially clobbering the parent texture that is being renderered
         // by the compositor thread.
-        Extensions3DChromium* parentExt = static_cast<Extensions3DChromium*>(m_context->getExtensions());
-        // For each child context:
-        //   glWaitLatch(Offscreen->Compositor);
         ChildContextMap::iterator i = m_childContexts.begin();
         for (; i != m_childContexts.end(); ++i) {
-            Extensions3DChromium* childExt = static_cast<Extensions3DChromium*>(i->first->getExtensions());
-            if (childExt->getGraphicsResetStatusARB() == GraphicsContext3D::NO_ERROR) {
-                GC3Duint childToParentLatchId;
-                childExt->getChildToParentLatchCHROMIUM(&childToParentLatchId);
-                childExt->setLatchCHROMIUM(childToParentLatchId);
-                parentExt->waitLatchCHROMIUM(childToParentLatchId);
-            }
+            i->first->flush();
         }
     }
 
@@ -317,23 +306,6 @@
     else
         m_renderSurfaceTextureManager->reduceMemoryToLimit(0);
 
-    // After drawLayers:
-    if (hardwareCompositing() && m_contextSupportsLatch) {
-        Extensions3DChromium* parentExt = static_cast<Extensions3DChromium*>(m_context->getExtensions());
-        // For each child context:
-        //   glSetLatch(Compositor->Offscreen);
-        ChildContextMap::iterator i = m_childContexts.begin();
-        for (; i != m_childContexts.end(); ++i) {
-            Extensions3DChromium* childExt = static_cast<Extensions3DChromium*>(i->first->getExtensions());
-            if (childExt->getGraphicsResetStatusARB() == GraphicsContext3D::NO_ERROR) {
-                GC3Duint parentToChildLatchId;
-                childExt->getParentToChildLatchCHROMIUM(&parentToChildLatchId);
-                parentExt->setLatchCHROMIUM(parentToChildLatchId);
-                childExt->waitLatchCHROMIUM(parentToChildLatchId);
-            }
-        }
-    }
-
     if (isCompositingOffscreen())
         copyOffscreenTextureToDisplay();
 }
@@ -1330,9 +1302,6 @@
 
 void LayerRendererChromium::addChildContext(GraphicsContext3D* ctx)
 {
-    if (!ctx->getExtensions()->supports("GL_CHROMIUM_latch"))
-        return;
-
     // This is a ref-counting map, because some contexts are shared by multiple
     // layers (specifically, Canvas2DLayerChromium).
 
@@ -1355,9 +1324,6 @@
 
 void LayerRendererChromium::removeChildContext(GraphicsContext3D* ctx)
 {
-    if (!ctx->getExtensions()->supports("GL_CHROMIUM_latch"))
-        return;
-
     ChildContextMap::iterator i = m_childContexts.find(ctx);
     if (i != m_childContexts.end()) {
         if (--i->second <= 0) {

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (91735 => 91736)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h	2011-07-26 01:18:07 UTC (rev 91736)
@@ -256,7 +256,6 @@
 
     ChildContextMap m_childContexts;
 
-    bool m_contextSupportsLatch;
     bool m_contextSupportsMapSub;
     bool m_contextSupportsTextureFormatBGRA;
     bool m_contextSupportsReadFormatBGRA;

Modified: trunk/Source/WebKit/chromium/ChangeLog (91735 => 91736)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-07-26 01:18:07 UTC (rev 91736)
@@ -1,3 +1,15 @@
+2011-07-25  Al Patrick  <[email protected]>
+
+        Removed support for the GL_latch_CHROMIUM extension which Chromium no longer supports.
+        https://bugs.webkit.org/show_bug.cgi?id=65043
+
+        Reviewed by James Robinson.
+
+        * public/WebGraphicsContext3D.h:
+        * src/Extensions3DChromium.cpp:
+        * src/GraphicsContext3DChromium.cpp:
+        * src/GraphicsContext3DInternal.h:
+
 2011-07-25  Nico Weber  <[email protected]>
 
         [chromium] Don't link in both libjpeg and libjpeg_turbo in the components build

Modified: trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h (91735 => 91736)


--- trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-07-26 01:18:07 UTC (rev 91736)
@@ -178,12 +178,6 @@
     virtual void blitFramebufferCHROMIUM(WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Dint dstY1, WGC3Dbitfield mask, WGC3Denum filter) = 0;
     virtual void renderbufferStorageMultisampleCHROMIUM(WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height) = 0;
 
-    // GL_CHROMIUM_latch
-    virtual void getParentToChildLatchCHROMIUM(WGC3Duint* latchId) = 0;
-    virtual void getChildToParentLatchCHROMIUM(WGC3Duint* latchId) = 0;
-    virtual void waitLatchCHROMIUM(WGC3Duint latchId) = 0;
-    virtual void setLatchCHROMIUM(WGC3Duint latchId) = 0;
-
     // GL_CHROMIUM_swapbuffers_complete_callback
     virtual void setSwapBuffersCompleteCallbackCHROMIUM(WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* callback) { }
 

Modified: trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp (91735 => 91736)


--- trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp	2011-07-26 01:18:07 UTC (rev 91736)
@@ -102,26 +102,6 @@
     m_internal->copyTextureToParentTextureCHROMIUM(texture, parentTexture);
 }
 
-void Extensions3DChromium::getParentToChildLatchCHROMIUM(GC3Duint* latchId)
-{
-    m_internal->getParentToChildLatchCHROMIUM(latchId);
-}
-
-void Extensions3DChromium::getChildToParentLatchCHROMIUM(GC3Duint* latchId)
-{
-    m_internal->getChildToParentLatchCHROMIUM(latchId);
-}
-
-void Extensions3DChromium::waitLatchCHROMIUM(GC3Duint latchId)
-{
-    m_internal->waitLatchCHROMIUM(latchId);
-}
-
-void Extensions3DChromium::setLatchCHROMIUM(GC3Duint latchId)
-{
-    m_internal->setLatchCHROMIUM(latchId);
-}
-
 Platform3DObject Extensions3DChromium::createVertexArrayOES()
 {
     return 0;

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (91735 => 91736)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-07-26 01:18:07 UTC (rev 91736)
@@ -840,10 +840,6 @@
 
 DELEGATE_TO_IMPL_10(blitFramebufferCHROMIUM, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dint, GC3Dbitfield, GC3Denum)
 DELEGATE_TO_IMPL_5(renderbufferStorageMultisampleCHROMIUM, GC3Denum, GC3Dsizei, GC3Denum, GC3Dsizei, GC3Dsizei)
-DELEGATE_TO_IMPL_1(getParentToChildLatchCHROMIUM, GC3Duint*)
-DELEGATE_TO_IMPL_1(getChildToParentLatchCHROMIUM, GC3Duint*)
-DELEGATE_TO_IMPL_1(waitLatchCHROMIUM, GC3Duint)
-DELEGATE_TO_IMPL_1(setLatchCHROMIUM, GC3Duint)
 
 DELEGATE_TO_IMPL(rateLimitOffscreenContextCHROMIUM)
 DELEGATE_TO_IMPL_R(getGraphicsResetStatusARB, GC3Denum)

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h (91735 => 91736)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h	2011-07-26 01:07:32 UTC (rev 91735)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h	2011-07-26 01:18:07 UTC (rev 91736)
@@ -280,12 +280,6 @@
     void blitFramebufferCHROMIUM(GC3Dint srcX0, GC3Dint srcY0, GC3Dint srcX1, GC3Dint srcY1, GC3Dint dstX0, GC3Dint dstY0, GC3Dint dstX1, GC3Dint dstY1, GC3Dbitfield mask, GC3Denum filter);
     void renderbufferStorageMultisampleCHROMIUM(GC3Denum target, GC3Dsizei samples, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height);
 
-    // GL_CHROMIUM_latch
-    void getParentToChildLatchCHROMIUM(GC3Duint* latchId);
-    void getChildToParentLatchCHROMIUM(GC3Duint* latchId);
-    void waitLatchCHROMIUM(GC3Duint latchId);
-    void setLatchCHROMIUM(GC3Duint latchId);
-
     // GL_CHROMIUM_swapbuffers_complete_callback
     void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<Extensions3DChromium::SwapBuffersCompleteCallbackCHROMIUM>);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to