Title: [117166] trunk
Revision
117166
Author
[email protected]
Date
2012-05-15 14:48:11 -0700 (Tue, 15 May 2012)

Log Message

[chromium] Move createOffscreenGraphicsContext3D() from WebKitPlatformSupport to Platform
https://bugs.webkit.org/show_bug.cgi?id=86524

Reviewed by Adam Barth.

Source/Platform:

Moves createOffscreenGraphicsContext3D(), previously on WebKitPlatformSupport, to WebKit::Platform.

* chromium/public/Platform.h:
(Platform):
(WebKit::Platform::createOffscreenGraphicsContext3D):

Source/WebKit/chromium:

Moves createOffscreenGraphicsContext3D() out (to WebKit::Platform) and updates GraphicsContext3DChromium to use
the new location. Also removes a few unnecessary includes from GraphicsContext3DChromium.cpp.

* public/platform/WebKitPlatformSupport.h:
(WebKitPlatformSupport):
* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3D::create):

Tools:

Updates TestWebPlugin to use the Platform headers and updates the build dependencies so it can.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/chromium/TestWebPlugin.cpp:
(TestWebPlugin::initialize):

Modified Paths

Diff

Modified: trunk/Source/Platform/ChangeLog (117165 => 117166)


--- trunk/Source/Platform/ChangeLog	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Source/Platform/ChangeLog	2012-05-15 21:48:11 UTC (rev 117166)
@@ -1,3 +1,16 @@
+2012-05-15  James Robinson  <[email protected]>
+
+        [chromium] Move createOffscreenGraphicsContext3D() from WebKitPlatformSupport to Platform
+        https://bugs.webkit.org/show_bug.cgi?id=86524
+
+        Reviewed by Adam Barth.
+
+        Moves createOffscreenGraphicsContext3D(), previously on WebKitPlatformSupport, to WebKit::Platform.
+
+        * chromium/public/Platform.h:
+        (Platform):
+        (WebKit::Platform::createOffscreenGraphicsContext3D):
+
 2012-05-14  Gavin Peters  <[email protected]>
 
         Add Prerenderer, PrerenderHandle and a chromium interface for Prerendering.

Modified: trunk/Source/Platform/chromium/public/Platform.h (117165 => 117166)


--- trunk/Source/Platform/chromium/public/Platform.h	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Source/Platform/chromium/public/Platform.h	2012-05-15 21:48:11 UTC (rev 117166)
@@ -35,6 +35,7 @@
 #include "WebCommon.h"
 #include "WebData.h"
 #include "WebGamepads.h"
+#include "WebGraphicsContext3D.h"
 #include "WebString.h"
 
 namespace WebKit {
@@ -294,6 +295,13 @@
     virtual void histogramEnumeration(const char* name, int sample, int boundaryValue) { }
 
 
+    // GPU ----------------------------------------------------------------
+    //
+    // May return null if GPU is not supported.
+    // Returns newly allocated and initialized offscreen WebGraphicsContext3D instance.
+    virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGraphicsContext3D::Attributes&) { return 0; }
+
+
     // WebRTC ----------------------------------------------------------
 
     // DEPRECATED

Modified: trunk/Source/WebKit/chromium/ChangeLog (117165 => 117166)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-15 21:48:11 UTC (rev 117166)
@@ -1,3 +1,18 @@
+2012-05-15  James Robinson  <[email protected]>
+
+        [chromium] Move createOffscreenGraphicsContext3D() from WebKitPlatformSupport to Platform
+        https://bugs.webkit.org/show_bug.cgi?id=86524
+
+        Reviewed by Adam Barth.
+
+        Moves createOffscreenGraphicsContext3D() out (to WebKit::Platform) and updates GraphicsContext3DChromium to use
+        the new location. Also removes a few unnecessary includes from GraphicsContext3DChromium.cpp.
+
+        * public/platform/WebKitPlatformSupport.h:
+        (WebKitPlatformSupport):
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3D::create):
+
 2012-05-15  Terry Anderson  <[email protected]>
 
         [chromium] Compute the best target node on a GestureTap event

Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (117165 => 117166)


--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h	2012-05-15 21:48:11 UTC (rev 117166)
@@ -159,10 +159,6 @@
     virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; }
 
     // GPU ----------------------------------------------------------------
-    //
-    // May return null if GPU is not supported.
-    // Returns newly allocated and initialized offscreen WebGraphicsContext3D instance.
-    virtual WebGraphicsContext3D* createOffscreenGraphicsContext3D(const WebGraphicsContext3D::Attributes&) { return 0; }
 
     // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas.
     // This will return false if the platform cannot promise that contexts will be preserved across operations like

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (117165 => 117166)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2012-05-15 21:48:11 UTC (rev 117166)
@@ -45,11 +45,8 @@
 #include "HTMLImageElement.h"
 #include "ImageBuffer.h"
 #include "ImageData.h"
-#include "WebKit.h"
-#include "WebViewClient.h"
-#include "WebViewImpl.h"
-#include "platform/WebGraphicsContext3D.h"
-#include "platform/WebKitPlatformSupport.h"
+#include <public/Platform.h>
+#include <public/WebGraphicsContext3D.h>
 
 #include <stdio.h>
 #include <wtf/FastMalloc.h>
@@ -1043,7 +1040,7 @@
     webAttributes.shareResources = attrs.shareResources;
     webAttributes.preferDiscreteGPU = attrs.preferDiscreteGPU;
 
-    OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::webKitPlatformSupport()->createOffscreenGraphicsContext3D(webAttributes));
+    OwnPtr<WebKit::WebGraphicsContext3D> webContext = adoptPtr(WebKit::Platform::current()->createOffscreenGraphicsContext3D(webAttributes));
     if (!webContext)
         return 0;
 

Modified: trunk/Tools/ChangeLog (117165 => 117166)


--- trunk/Tools/ChangeLog	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Tools/ChangeLog	2012-05-15 21:48:11 UTC (rev 117166)
@@ -1,3 +1,16 @@
+2012-05-15  James Robinson  <[email protected]>
+
+        [chromium] Move createOffscreenGraphicsContext3D() from WebKitPlatformSupport to Platform
+        https://bugs.webkit.org/show_bug.cgi?id=86524
+
+        Reviewed by Adam Barth.
+
+        Updates TestWebPlugin to use the Platform headers and updates the build dependencies so it can.
+
+        * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+        * DumpRenderTree/chromium/TestWebPlugin.cpp:
+        (TestWebPlugin::initialize):
+
 2012-05-15  Jessie Berlin  <[email protected]>
 
         WKContextSetCacheModel(contextref, kWKCacheModelDocumentViewer) doesn't prevent pages from

Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp (117165 => 117166)


--- trunk/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp	2012-05-15 21:48:11 UTC (rev 117166)
@@ -78,6 +78,7 @@
             'type': 'executable',
             'mac_bundle': 1,
             'dependencies': [
+                '<(source_dir)/Platform/Platform.gyp/Platform.gyp:webkit_platform',
                 '<(source_dir)/WebKit/chromium/WebKit.gyp:inspector_resources',
                 '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
                 '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',

Modified: trunk/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp (117165 => 117166)


--- trunk/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp	2012-05-15 21:43:10 UTC (rev 117165)
+++ trunk/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp	2012-05-15 21:48:11 UTC (rev 117166)
@@ -27,11 +27,10 @@
 #include "TestWebPlugin.h"
 
 #include "WebFrame.h"
-#include "platform/WebGraphicsContext3D.h"
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
 #include "WebPluginContainer.h"
 #include "WebPluginParams.h"
+#include <public/Platform.h>
+#include <public/WebGraphicsContext3D.h>
 #include <wtf/Assertions.h>
 #include <wtf/text/CString.h>
 
@@ -116,7 +115,7 @@
 bool TestWebPlugin::initialize(WebPluginContainer* container)
 {
     WebGraphicsContext3D::Attributes attrs;
-    m_context = webKitPlatformSupport()->createOffscreenGraphicsContext3D(attrs);
+    m_context = WebKit::Platform::current()->createOffscreenGraphicsContext3D(attrs);
     if (!m_context)
         return false;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to