Title: [93625] trunk/Source
Revision
93625
Author
[email protected]
Date
2011-08-23 12:30:52 -0700 (Tue, 23 Aug 2011)

Log Message

Add shareResources flag to 3D graphics context attributes
https://bugs.webkit.org/show_bug.cgi?id=66516

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

Source/WebCore:

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes):
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3D::create):

Source/WebKit/chromium:

* public/WebGraphicsContext3D.h:
(WebKit::WebGraphicsContext3D::Attributes::Attributes):
* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3DInternal::initialize):
* src/WebViewImpl.cpp:
(std::getCompositorContextAttributes):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93624 => 93625)


--- trunk/Source/WebCore/ChangeLog	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebCore/ChangeLog	2011-08-23 19:30:52 UTC (rev 93625)
@@ -1,3 +1,17 @@
+2011-08-23  Al Patrick  <[email protected]>
+
+        Add shareResources flag to 3D graphics context attributes
+        https://bugs.webkit.org/show_bug.cgi?id=66516
+
+        Reviewed by James Robinson.
+
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::create):
+        * platform/graphics/GraphicsContext3D.h:
+        (WebCore::GraphicsContext3D::Attributes::Attributes):
+        * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+        (WebCore::SharedGraphicsContext3D::create):
+
 2011-08-23  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r93616.

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (93624 => 93625)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2011-08-23 19:30:52 UTC (rev 93625)
@@ -363,6 +363,8 @@
     }
 
     attributes.noExtensions = true;
+    attributes.shareResources = false;
+
     RefPtr<GraphicsContext3D> context(GraphicsContext3D::create(attributes, hostWindow));
 
     if (!context) {

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (93624 => 93625)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2011-08-23 19:30:52 UTC (rev 93625)
@@ -436,6 +436,7 @@
             , canRecoverFromContextLoss(true)
             , preserveDrawingBuffer(false)
             , noExtensions(false)
+            , shareResources(true)
         {
         }
 
@@ -447,6 +448,7 @@
         bool canRecoverFromContextLoss;
         bool preserveDrawingBuffer;
         bool noExtensions;
+        bool shareResources;
     };
 
     enum RenderStyle {

Modified: trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp (93624 => 93625)


--- trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp	2011-08-23 19:30:52 UTC (rev 93625)
@@ -37,6 +37,7 @@
     attributes.stencil = true;
     attributes.antialias = false;
     attributes.canRecoverFromContextLoss = false; // Canvas contexts can not handle lost contexts.
+    attributes.shareResources = true;
     static RefPtr<GraphicsContext3D> context = GraphicsContext3D::create(attributes, window);
     return context.get();
 }

Modified: trunk/Source/WebKit/chromium/ChangeLog (93624 => 93625)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-08-23 19:30:52 UTC (rev 93625)
@@ -1,3 +1,17 @@
+2011-08-23  Al Patrick  <[email protected]>
+
+        Add shareResources flag to 3D graphics context attributes
+        https://bugs.webkit.org/show_bug.cgi?id=66516
+
+        Reviewed by James Robinson.
+
+        * public/WebGraphicsContext3D.h:
+        (WebKit::WebGraphicsContext3D::Attributes::Attributes):
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3DInternal::initialize):
+        * src/WebViewImpl.cpp:
+        (std::getCompositorContextAttributes):
+
 2011-08-23  Fady Samuel  <[email protected]>
 
         New MainFrame views should inherit fixed layout settings from existing MainFrame view in Chromium.

Modified: trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h (93624 => 93625)


--- trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-08-23 19:30:52 UTC (rev 93625)
@@ -86,6 +86,7 @@
             , premultipliedAlpha(true)
             , canRecoverFromContextLoss(true)
             , noExtensions(false)
+            , shareResources(true)
         {
         }
 
@@ -96,6 +97,7 @@
         bool premultipliedAlpha;
         bool canRecoverFromContextLoss;
         bool noExtensions;
+        bool shareResources;
     };
 
     class WebGraphicsContextLostCallback {

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (93624 => 93625)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-08-23 19:30:52 UTC (rev 93625)
@@ -118,6 +118,7 @@
     webAttributes.premultipliedAlpha = attrs.premultipliedAlpha;
     webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss;
     webAttributes.noExtensions = attrs.noExtensions;
+    webAttributes.shareResources = attrs.shareResources;
     OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::webKitClient()->createGraphicsContext3D());
     if (!webContext)
         return false;

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (93624 => 93625)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-08-23 19:28:23 UTC (rev 93624)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-08-23 19:30:52 UTC (rev 93625)
@@ -176,6 +176,7 @@
     // disparities we explicitly disable antialiasing.
     GraphicsContext3D::Attributes attributes;
     attributes.antialias = false;
+    attributes.shareResources = true;
     return attributes;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to