[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

cmarrin at apple.com cmarrin at apple.com
Wed Dec 22 14:08:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f57f3cce7a1119c872d2ae2291655626df583b8b
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 5 00:09:52 2010 +0000

    2010-10-04  Chris Marrin  <cmarrin at apple.com>
    
            Reviewed by James Robinson.
    
            Move SharedGraphicsContext3D from ChromeClient to Page
            https://bugs.webkit.org/show_bug.cgi?id=47113
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 46b1f80..9a7b95b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-04  Chris Marrin  <cmarrin at apple.com>
+
+        Reviewed by James Robinson.
+
+        Move SharedGraphicsContext3D from ChromeClient to Page
+        https://bugs.webkit.org/show_bug.cgi?id=47113
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
+        * page/ChromeClient.h:
+        * page/Page.cpp:
+        (WebCore::Page::sharedGraphicsContext3D):
+        * page/Page.h:
+        * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+        (WebCore::SharedGraphicsContext3D::create):
+        * platform/graphics/gpu/SharedGraphicsContext3D.h:
+
 2010-10-04  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Nate Chapin.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 52b2deb..ebef507 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -128,7 +128,7 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement* canvas, bo
         return;
     if (!p->settings()->accelerated2dCanvasEnabled())
         return;
-    m_context3D = p->chrome()->client()->getSharedGraphicsContext3D();
+    m_context3D = p->sharedGraphicsContext3D();
     if (m_context3D) {
         if (GraphicsContext* c = drawingContext()) {
             m_drawingBuffer = DrawingBuffer::create(m_context3D.get(), IntSize(canvas->width(), canvas->height()));
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index 4791f51..bf634d1 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -233,8 +233,6 @@ namespace WebCore {
         virtual bool allowsAcceleratedCompositing() const { return true; }
 #endif
 
-        virtual SharedGraphicsContext3D* getSharedGraphicsContext3D() { return 0; }
-
         virtual bool supportsFullscreenForNode(const Node*) { return false; }
         virtual void enterFullscreenForNode(Node*) { }
         virtual void exitFullscreenForNode(Node*) { }
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index 2c73fa8..12ca88c 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -73,6 +73,10 @@
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/StringHash.h>
 
+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "SharedGraphicsContext3D.h"
+#endif
+
 #if ENABLE(DOM_STORAGE)
 #include "StorageArea.h"
 #include "StorageNamespace.h"
@@ -765,6 +769,18 @@ void Page::setDebugger(JSC::Debugger* debugger)
         frame->script()->attachDebugger(m_debugger);
 }
 
+SharedGraphicsContext3D* Page::sharedGraphicsContext3D()
+{
+#if ENABLE(ACCELERATED_2D_CANVAS)
+    if (!m_sharedGraphicsContext3D)
+        m_sharedGraphicsContext3D = SharedGraphicsContext3D::create(chrome());
+
+    return m_sharedGraphicsContext3D.get();
+#else
+    return 0;
+#endif
+}
+
 #if ENABLE(DOM_STORAGE)
 StorageNamespace* Page::sessionStorage(bool optionalCreate)
 {
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 460a698..f7830db 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -73,6 +73,7 @@ namespace WebCore {
     class VisibleSelection;
     class SelectionController;
     class Settings;
+    class SharedGraphicsContext3D;
     class SpeechInput;
     class SpeechInputClient;
 
@@ -263,6 +264,8 @@ namespace WebCore {
         static void allVisitedStateChanged(PageGroup*);
         static void visitedStateChanged(PageGroup*, LinkHash visitedHash);
 
+        SharedGraphicsContext3D* sharedGraphicsContext3D();
+
 #if ENABLE(DOM_STORAGE)
         StorageNamespace* sessionStorage(bool optionalCreate = true);
         void setSessionStorage(PassRefPtr<StorageNamespace>);
@@ -308,6 +311,11 @@ namespace WebCore {
 
         OwnPtr<Chrome> m_chrome;
         OwnPtr<SelectionController> m_dragCaretController;
+
+#if ENABLE(ACCELERATED_2D_CANVAS)
+        RefPtr<SharedGraphicsContext3D> m_sharedGraphicsContext3D;
+#endif
+        
 #if ENABLE(DRAG_SUPPORT)
         OwnPtr<DragController> m_dragController;
 #endif
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
index a472d32..7b4e5fb 100644
--- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
+++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
@@ -49,9 +49,13 @@
 namespace WebCore {
 
 // static
-PassRefPtr<SharedGraphicsContext3D> SharedGraphicsContext3D::create(PassOwnPtr<GraphicsContext3D> context)
+PassRefPtr<SharedGraphicsContext3D> SharedGraphicsContext3D::create(HostWindow* hostWindow)
 {
-    return adoptRef(new SharedGraphicsContext3D(context));
+    GraphicsContext3D::Attributes attr;
+    OwnPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, hostWindow);
+    if (!context)
+        return 0;
+    return adoptRef(new SharedGraphicsContext3D(context.get()));
 }
 
 SharedGraphicsContext3D::SharedGraphicsContext3D(PassOwnPtr<GraphicsContext3D> context)
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
index 3ba3c52..794f016 100644
--- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
+++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
@@ -47,6 +47,7 @@ class AffineTransform;
 class Color;
 class GraphicsContext3D;
 class FloatRect;
+class HostWindow;
 class IntSize;
 class SolidFillShader;
 class TexShader;
@@ -55,7 +56,7 @@ typedef HashMap<NativeImagePtr, RefPtr<Texture> > TextureHashMap;
 
 class SharedGraphicsContext3D : public RefCounted<SharedGraphicsContext3D> {
 public:
-    static PassRefPtr<SharedGraphicsContext3D> create(PassOwnPtr<GraphicsContext3D>);
+    static PassRefPtr<SharedGraphicsContext3D> create(HostWindow*);
     ~SharedGraphicsContext3D();
 
     // Functions that delegate directly to GraphicsContext3D, with caching
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0e94578..f094637 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-04  Chris Marrin  <cmarrin at apple.com>
+
+        Reviewed by James Robinson.
+
+        Move SharedGraphicsContext3D from ChromeClient to Page
+        https://bugs.webkit.org/show_bug.cgi?id=47113
+
+        * src/ChromeClientImpl.cpp:
+        * src/WebViewImpl.cpp:
+        * src/WebViewImpl.h:
+
 2010-10-04  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Nate Chapin.
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 5f702e0..db7788d 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -58,7 +58,6 @@
 #include "ScriptController.h"
 #include "SearchPopupMenuChromium.h"
 #include "SecurityOrigin.h"
-#include "SharedGraphicsContext3D.h"
 #if USE(V8)
 #include "V8Proxy.h"
 #endif
@@ -805,11 +804,6 @@ bool ChromeClientImpl::allowsAcceleratedCompositing() const
 }
 #endif
 
-WebCore::SharedGraphicsContext3D* ChromeClientImpl::getSharedGraphicsContext3D()
-{
-    return m_webView->getSharedGraphicsContext3D();
-}
-
 bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
 {
     if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 4083806..5820aaa 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -130,10 +130,6 @@
 #include "RenderTheme.h"
 #endif
 
-#if ENABLE(ACCELERATED_2D_CANVAS)
-#include "SharedGraphicsContext3D.h"
-#endif
-
 // Get rid of WTF's pow define so we can use std::pow.
 #undef pow
 #include <cmath> // for std::pow
@@ -2452,23 +2448,6 @@ void WebViewImpl::doComposite()
 #endif
 
 
-SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
-{
-#if ENABLE(ACCELERATED_2D_CANVAS)
-    if (!m_sharedContext3D) {
-        GraphicsContext3D::Attributes attr;
-        OwnPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, m_page->chrome());
-        if (!context)
-            return 0;
-        m_sharedContext3D = SharedGraphicsContext3D::create(context.release());
-    }
-
-    return m_sharedContext3D.get();
-#else
-    return 0;
-#endif
-}
-
 WebGraphicsContext3D* WebViewImpl::graphicsContext3D()
 {
 #if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 165d6c1..e51df4d 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -340,8 +340,6 @@ public:
     // WebGL. Returns 0 if compositing support is not compiled in.
     virtual WebGraphicsContext3D* graphicsContext3D();
 
-    virtual WebCore::SharedGraphicsContext3D* getSharedGraphicsContext3D();
-
     WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
 
     // Returns true if the event leads to scrolling.
@@ -545,10 +543,6 @@ private:
     // the compositor has been turned on, we need to instantiate it
     // early. This member holds on to the GC3D in this case.
     OwnPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
-
-#if ENABLE(ACCELERATED_2D_CANVAS)
-    RefPtr<WebCore::SharedGraphicsContext3D> m_sharedContext3D;
-#endif
     OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list