Title: [136907] trunk/Source
- Revision
- 136907
- Author
- [email protected]
- Date
- 2012-12-06 16:26:52 -0800 (Thu, 06 Dec 2012)
Log Message
Associate URLs with GraphicsContext3D instances created for WebGL
https://bugs.webkit.org/show_bug.cgi?id=103793
Reviewed by Adam Barth.
Source/Platform:
* chromium/public/WebGraphicsContext3D.h:
(Attributes):
Add top document's URL to context creation attributes.
Source/WebCore:
Pass down the URL of the topmost frame's document creating the
WebGL context to the platform layer through
GraphicsContext3D::Attributes.
Not feasible to write a layout test for this change; has no
user-visible effect. Tested manually with failure injection in
Chromium port.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::create):
Pass top document's URL in context creation attributes.
* platform/chromium/support/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3D::create):
Pass URL through WebKit API.
* platform/graphics/GraphicsContext3D.h:
(Attributes):
Add top document's URL to context creation attributes.
Modified Paths
Diff
Modified: trunk/Source/Platform/ChangeLog (136906 => 136907)
--- trunk/Source/Platform/ChangeLog 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/Platform/ChangeLog 2012-12-07 00:26:52 UTC (rev 136907)
@@ -1,3 +1,14 @@
+2012-12-06 Kenneth Russell <[email protected]>
+
+ Associate URLs with GraphicsContext3D instances created for WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=103793
+
+ Reviewed by Adam Barth.
+
+ * chromium/public/WebGraphicsContext3D.h:
+ (Attributes):
+ Add top document's URL to context creation attributes.
+
2012-12-06 David Reveman <[email protected]>
[Chromium] Add GL_CHROMIUM_async_pixel_transfers extension support.
Modified: trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h (136906 => 136907)
--- trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h 2012-12-07 00:26:52 UTC (rev 136907)
@@ -109,6 +109,10 @@
bool shareResources;
bool preferDiscreteGPU;
bool noAutomaticFlushes;
+ // FIXME: ideally this would be a WebURL, but it is currently not
+ // possible to pass a WebURL by value across the WebKit API boundary.
+ // See https://bugs.webkit.org/show_bug.cgi?id=103793#c13 .
+ WebString topDocumentURL;
};
class WebGraphicsContextLostCallback {
Modified: trunk/Source/WebCore/ChangeLog (136906 => 136907)
--- trunk/Source/WebCore/ChangeLog 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/WebCore/ChangeLog 2012-12-07 00:26:52 UTC (rev 136907)
@@ -1,3 +1,29 @@
+2012-12-06 Kenneth Russell <[email protected]>
+
+ Associate URLs with GraphicsContext3D instances created for WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=103793
+
+ Reviewed by Adam Barth.
+
+ Pass down the URL of the topmost frame's document creating the
+ WebGL context to the platform layer through
+ GraphicsContext3D::Attributes.
+
+ Not feasible to write a layout test for this change; has no
+ user-visible effect. Tested manually with failure injection in
+ Chromium port.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore):
+ (WebCore::WebGLRenderingContext::create):
+ Pass top document's URL in context creation attributes.
+ * platform/chromium/support/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3D::create):
+ Pass URL through WebKit API.
+ * platform/graphics/GraphicsContext3D.h:
+ (Attributes):
+ Add top document's URL to context creation attributes.
+
2012-12-06 Philip Rogers <[email protected]>
Unify SVG's animation and target tracking systems.
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (136906 => 136907)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-12-07 00:26:52 UTC (rev 136907)
@@ -425,8 +425,8 @@
attributes.shareResources = false;
#endif
attributes.preferDiscreteGPU = true;
+ attributes.topDocumentURL = document->topDocument()->url();
-
RefPtr<GraphicsContext3D> context(GraphicsContext3D::create(attributes, hostWindow));
if (!context || !context->makeContextCurrent()) {
Modified: trunk/Source/WebCore/platform/chromium/support/GraphicsContext3DChromium.cpp (136906 => 136907)
--- trunk/Source/WebCore/platform/chromium/support/GraphicsContext3DChromium.cpp 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/WebCore/platform/chromium/support/GraphicsContext3DChromium.cpp 2012-12-07 00:26:52 UTC (rev 136907)
@@ -76,6 +76,7 @@
webAttributes.noExtensions = attrs.noExtensions;
webAttributes.shareResources = attrs.shareResources;
webAttributes.preferDiscreteGPU = attrs.preferDiscreteGPU;
+ webAttributes.topDocumentURL = attrs.topDocumentURL.string();
OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::Platform::current()->createOffscreenGraphicsContext3D(webAttributes));
if (!webContext)
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (136906 => 136907)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2012-12-07 00:21:57 UTC (rev 136906)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2012-12-07 00:26:52 UTC (rev 136907)
@@ -26,9 +26,10 @@
#ifndef GraphicsContext3D_h
#define GraphicsContext3D_h
+#include "GraphicsTypes3D.h"
#include "Image.h"
#include "IntRect.h"
-#include "GraphicsTypes3D.h"
+#include "KURL.h"
#include "PlatformLayer.h"
#include <wtf/HashMap.h>
#include <wtf/ListHashSet.h>
@@ -459,6 +460,7 @@
bool noExtensions;
bool shareResources;
bool preferDiscreteGPU;
+ KURL topDocumentURL;
};
enum RenderStyle {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes