Title: [100146] trunk/Source
Revision
100146
Author
[email protected]
Date
2011-11-14 08:30:49 -0800 (Mon, 14 Nov 2011)

Log Message

[chromium] Plumb through partial swap
https://bugs.webkit.org/show_bug.cgi?id=72028

Patch by Jonathan Backer <[email protected]> on 2011-11-14
Reviewed by Kenneth Russell.

Source/WebCore:

* platform/graphics/chromium/Extensions3DChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):

Source/WebKit/chromium:

* public/WebGraphicsContext3D.h:
* src/Extensions3DChromium.cpp:
(WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
* src/GraphicsContext3DChromium.cpp:
* src/GraphicsContext3DPrivate.h:
* tests/MockWebGraphicsContext3D.h:
(WebKit::MockWebGraphicsContext3D::postSubBufferCHROMIUM):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (100145 => 100146)


--- trunk/Source/WebCore/ChangeLog	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebCore/ChangeLog	2011-11-14 16:30:49 UTC (rev 100146)
@@ -1,3 +1,16 @@
+2011-11-14  Jonathan Backer  <[email protected]>
+
+        [chromium] Plumb through partial swap
+        https://bugs.webkit.org/show_bug.cgi?id=72028
+
+        Reviewed by Kenneth Russell.
+
+        * platform/graphics/chromium/Extensions3DChromium.h:
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::initialize):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+        (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
+
 2011-11-14  Andrey Kosyakov  <[email protected]>
 
         Web Inspector: expose iframe window to the onShown event handler of panels & sidebars

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


--- trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h	2011-11-14 16:30:49 UTC (rev 100146)
@@ -40,6 +40,7 @@
     // Supported extensions:
     //   GL_CHROMIUM_resource_safe  : indicating that textures/renderbuffers are always initialized before read/write.
     //   GL_CHROMIUM_strict_attribs : indicating a GL error is generated for out-of-bounds buffer accesses.
+    //   GL_CHROMIUM_post_sub_buffer
     //   GL_CHROMIUM_map_sub
     //   GL_CHROMIUM_swapbuffers_complete_callback
     //   GL_CHROMIUM_rate_limit_offscreen_context
@@ -64,6 +65,9 @@
         WRITE_ONLY = 0x88B9
     };
 
+    // GL_CHROMIUM_post_sub_buffer
+    void postSubBufferCHROMIUM(int x, int y, int width, int height);
+
     // GL_CHROMIUM_map_sub
     void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access);
     void unmapBufferSubDataCHROMIUM(const void*);

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


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-11-14 16:30:49 UTC (rev 100146)
@@ -187,6 +187,10 @@
         m_capabilities.usingAcceleratedPainting = true;
 
     WebCore::Extensions3D* extensions = m_context->getExtensions();
+    m_capabilities.usingPostSubBuffer = extensions->supports("GL_CHROMIUM_post_sub_buffer");
+    if (m_capabilities.usingPostSubBuffer)
+        extensions->ensureEnabled("GL_CHROMIUM_post_sub_buffer");
+
     m_capabilities.usingMapSub = extensions->supports("GL_CHROMIUM_map_sub");
     if (m_capabilities.usingMapSub)
         extensions->ensureEnabled("GL_CHROMIUM_map_sub");

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (100145 => 100146)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-11-14 16:30:49 UTC (rev 100146)
@@ -85,6 +85,7 @@
 struct LayerRendererCapabilities {
     LayerRendererCapabilities()
         : bestTextureFormat(0)
+        , usingPostSubBuffer(false)
         , usingMapSub(false)
         , usingAcceleratedPainting(false)
         , usingSetVisibility(false)
@@ -92,6 +93,7 @@
         , maxTextureSize(0) { }
 
     GC3Denum bestTextureFormat;
+    bool usingPostSubBuffer;
     bool usingMapSub;
     bool usingAcceleratedPainting;
     bool usingSetVisibility;

Modified: trunk/Source/WebKit/chromium/ChangeLog (100145 => 100146)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-14 16:30:49 UTC (rev 100146)
@@ -1,3 +1,18 @@
+2011-11-14  Jonathan Backer  <[email protected]>
+
+        [chromium] Plumb through partial swap
+        https://bugs.webkit.org/show_bug.cgi?id=72028
+
+        Reviewed by Kenneth Russell.
+
+        * public/WebGraphicsContext3D.h:
+        * src/Extensions3DChromium.cpp:
+        (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
+        * src/GraphicsContext3DChromium.cpp:
+        * src/GraphicsContext3DPrivate.h:
+        * tests/MockWebGraphicsContext3D.h:
+        (WebKit::MockWebGraphicsContext3D::postSubBufferCHROMIUM):
+
 2011-11-14  Iain Merrick  <[email protected]>
 
         [chromium] Fix incorrect usage of ASSERT in CCLayerTreeHostTest

Modified: trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h (100145 => 100146)


--- trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-11-14 16:30:49 UTC (rev 100146)
@@ -163,6 +163,9 @@
     // context to the corresponding texture used by the compositor.
     virtual void prepareTexture() = 0;
 
+    // GL_CHROMIUM_post_sub_buffer - Copies part of the back buffer to the front buffer.
+    virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) = 0;
+
     // Synthesizes an OpenGL error which will be returned from a
     // later call to getError. This is used to emulate OpenGL ES
     // 2.0 behavior on the desktop and to enforce additional error

Modified: trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp (100145 => 100146)


--- trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp	2011-11-14 16:30:49 UTC (rev 100146)
@@ -77,6 +77,11 @@
     m_private->renderbufferStorageMultisampleCHROMIUM(target, samples, internalformat, width, height);
 }
 
+void Extensions3DChromium::postSubBufferCHROMIUM(int x, int y, int width, int height)
+{
+    m_private->postSubBufferCHROMIUM(x, y, width, height);
+}
+
 void* Extensions3DChromium::mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access)
 {
     return m_private->mapBufferSubDataCHROMIUM(target, offset, size, access);

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (100145 => 100146)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-11-14 16:30:49 UTC (rev 100146)
@@ -882,6 +882,8 @@
     return m_enabledExtensions.contains(mappedName);
 }
 
+DELEGATE_TO_IMPL_4(postSubBufferCHROMIUM, int, int, int, int)
+
 DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*)
 DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*)
 DELEGATE_TO_IMPL_9R(mapTexSubImage2DCHROMIUM, GC3Denum, GC3Dint, GC3Dint, GC3Dint, GC3Dsizei, GC3Dsizei, GC3Denum, GC3Denum, GC3Denum, void*)

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h (100145 => 100146)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DPrivate.h	2011-11-14 16:30:49 UTC (rev 100146)
@@ -101,6 +101,9 @@
 
     void prepareTexture();
 
+    // CHROMIUM_post_sub_buffer
+    void postSubBufferCHROMIUM(int x, int y, int width, int height);
+
     bool isGLES2Compliant() const;
 
     void releaseShaderCompiler();

Modified: trunk/Source/WebKit/chromium/tests/MockWebGraphicsContext3D.h (100145 => 100146)


--- trunk/Source/WebKit/chromium/tests/MockWebGraphicsContext3D.h	2011-11-14 16:29:34 UTC (rev 100145)
+++ trunk/Source/WebKit/chromium/tests/MockWebGraphicsContext3D.h	2011-11-14 16:30:49 UTC (rev 100146)
@@ -52,6 +52,8 @@
 
     virtual void prepareTexture() { }
 
+    virtual void postSubBufferCHROMIUM(int x, int y, int width, int height) { }
+
     virtual void synthesizeGLError(WGC3Denum) { }
 
     virtual bool isContextLost() { return false; }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to