Diff
Modified: trunk/Source/Platform/ChangeLog (136608 => 136609)
--- trunk/Source/Platform/ChangeLog 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/Platform/ChangeLog 2012-12-05 02:49:07 UTC (rev 136609)
@@ -1,3 +1,16 @@
+2012-12-04 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.
+
+ * Platform.gyp/Platform.gyp:
+ Allow WebURL.h to be included directly or indirectly from Platform.h.
+ * chromium/public/WebGraphicsContext3D.h:
+ (Attributes):
+ Add top document's URL to context creation attributes.
+
2012-12-04 Glenn Hartmann <[email protected]>
Gut WebRenderingStats since we no longer use its member variables.
Modified: trunk/Source/Platform/Platform.gyp/Platform.gyp (136608 => 136609)
--- trunk/Source/Platform/Platform.gyp/Platform.gyp 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/Platform/Platform.gyp/Platform.gyp 2012-12-05 02:49:07 UTC (rev 136609)
@@ -40,6 +40,7 @@
'dependencies': [
'../../WTF/WTF.gyp/WTF.gyp:wtf',
'<(DEPTH)/skia/skia.gyp:skia',
+ '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
],
'include_dirs': [
'../chromium',
@@ -76,6 +77,9 @@
'<(output_dir)'
],
},
+ 'export_dependent_settings': [
+ '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
+ ],
'conditions': [
['inside_chromium_build==1', {
'conditions': [
Modified: trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h (136608 => 136609)
--- trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/Platform/chromium/public/WebGraphicsContext3D.h 2012-12-05 02:49:07 UTC (rev 136609)
@@ -36,6 +36,7 @@
#include "WebGraphicsMemoryStats.h"
#include "WebNonCopyable.h"
#include "WebString.h"
+#include "WebURL.h"
#define USE_WGC3D_TYPES
@@ -109,6 +110,7 @@
bool shareResources;
bool preferDiscreteGPU;
bool noAutomaticFlushes;
+ WebURL topDocumentURL;
};
class WebGraphicsContextLostCallback {
Modified: trunk/Source/WebCore/ChangeLog (136608 => 136609)
--- trunk/Source/WebCore/ChangeLog 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebCore/ChangeLog 2012-12-05 02:49:07 UTC (rev 136609)
@@ -1,3 +1,29 @@
+2012-12-04 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-04 Yury Semikhatsky <[email protected]>
Web Inspector: simplify reportMemoryUsage signature
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (136608 => 136609)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-12-05 02:49:07 UTC (rev 136609)
@@ -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 (136608 => 136609)
--- trunk/Source/WebCore/platform/chromium/support/GraphicsContext3DChromium.cpp 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebCore/platform/chromium/support/GraphicsContext3DChromium.cpp 2012-12-05 02:49:07 UTC (rev 136609)
@@ -76,6 +76,7 @@
webAttributes.noExtensions = attrs.noExtensions;
webAttributes.shareResources = attrs.shareResources;
webAttributes.preferDiscreteGPU = attrs.preferDiscreteGPU;
+ webAttributes.topDocumentURL = attrs.topDocumentURL;
OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::Platform::current()->createOffscreenGraphicsContext3D(webAttributes));
if (!webContext)
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (136608 => 136609)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2012-12-05 02:49:07 UTC (rev 136609)
@@ -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 {
Modified: trunk/Source/WebKit/chromium/ChangeLog (136608 => 136609)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-12-05 02:49:07 UTC (rev 136609)
@@ -1,3 +1,13 @@
+2012-12-04 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.
+
+ * WebKit.gyp:
+ Allow WebURL.h to be included directly or indirectly from Platform.h.
+
2012-12-04 Adam Barth <[email protected]>
[V8] Cleanup style in V8DOMWrapper
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (136608 => 136609)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-12-05 02:40:25 UTC (rev 136608)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-12-05 02:49:07 UTC (rev 136609)
@@ -874,6 +874,7 @@
'type': 'static_library',
'dependencies': [
'../../WTF/WTF.gyp/WTF.gyp:wtf',
+ '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
],
'defines': [
'WEBKIT_IMPLEMENTATION=1',