Title: [102817] trunk/Source
Revision
102817
Author
[email protected]
Date
2011-12-14 13:25:01 -0800 (Wed, 14 Dec 2011)

Log Message

[chromium] Plumb through flag for enabling partial swap
https://bugs.webkit.org/show_bug.cgi?id=74513

Patch by Jonathan Backer <[email protected]> on 2011-12-14
Reviewed by James Robinson.

Source/WebCore:

* page/Settings.h:
(WebCore::Settings::setPartialSwapEnabled):
(WebCore::Settings::partialSwapEnabled):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):

Source/WebKit/chromium:

* public/WebSettings.h:
* public/platform/WebLayerTreeView.h:
(WebKit::WebLayerTreeView::Settings::Settings):
* src/WebLayerTreeView.cpp:
(WebKit::WebLayerTreeView::Settings::operator CCSettings):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setPartialSwapEnabled):
* src/WebSettingsImpl.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102816 => 102817)


--- trunk/Source/WebCore/ChangeLog	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebCore/ChangeLog	2011-12-14 21:25:01 UTC (rev 102817)
@@ -1,3 +1,18 @@
+2011-12-14  Jonathan Backer  <[email protected]>
+
+        [chromium] Plumb through flag for enabling partial swap
+        https://bugs.webkit.org/show_bug.cgi?id=74513
+
+        Reviewed by James Robinson.
+
+        * page/Settings.h:
+        (WebCore::Settings::setPartialSwapEnabled):
+        (WebCore::Settings::partialSwapEnabled):
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::initialize):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.h:
+        (WebCore::CCSettings::CCSettings):
+
 2011-12-14  Mike Reed  <[email protected]>
 
         [skia] cache typeface in FontPlatformData

Modified: trunk/Source/WebCore/page/Settings.cpp (102816 => 102817)


--- trunk/Source/WebCore/page/Settings.cpp	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebCore/page/Settings.cpp	2011-12-14 21:25:01 UTC (rev 102817)
@@ -233,6 +233,7 @@
     , m_shouldDisplayTextDescriptions(false)
 #endif
     , m_perTileDrawingEnabled(false)
+    , m_partialSwapEnabled(false)
     , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired)
 {
     // A Frame may not have been created yet, so we initialize the AtomicString 

Modified: trunk/Source/WebCore/page/Settings.h (102816 => 102817)


--- trunk/Source/WebCore/page/Settings.h	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebCore/page/Settings.h	2011-12-14 21:25:01 UTC (rev 102817)
@@ -506,6 +506,9 @@
         void setPerTileDrawingEnabled(bool enabled) { m_perTileDrawingEnabled = enabled; }
         bool perTileDrawingEnabled() const { return m_perTileDrawingEnabled; }
 
+        void setPartialSwapEnabled(bool enabled) { m_partialSwapEnabled = enabled; }
+        bool partialSwapEnabled() const { return m_partialSwapEnabled; }
+
     private:
         Page* m_page;
 
@@ -640,6 +643,7 @@
         bool m_shouldDisplayTextDescriptions : 1;
 #endif
         bool m_perTileDrawingEnabled : 1;
+        bool m_partialSwapEnabled : 1;
 
         Timer<Settings> m_loadsImagesAutomaticallyTimer;
         void loadsImagesAutomaticallyTimerFired(Timer<Settings>*);

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (102816 => 102817)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-12-14 21:25:01 UTC (rev 102817)
@@ -206,12 +206,9 @@
     if (m_capabilities.contextHasCachedFrontBuffer)
         extensions->ensureEnabled("GL_CHROMIUM_front_buffer_cached");
 
-    m_capabilities.usingPartialSwap = extensions->supports("GL_CHROMIUM_post_sub_buffer");
+    m_capabilities.usingPartialSwap = settings().partialSwapEnabled && extensions->supports("GL_CHROMIUM_post_sub_buffer");
     if (m_capabilities.usingPartialSwap)
         extensions->ensureEnabled("GL_CHROMIUM_post_sub_buffer");
-    // FIXME: eventually we would like to have usingPartialSwap enabled by default,
-    //        whenever it is supported. For now, we force it off.
-    m_capabilities.usingPartialSwap = false;
 
     m_capabilities.usingMapSub = extensions->supports("GL_CHROMIUM_map_sub");
     if (m_capabilities.usingMapSub)

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h (102816 => 102817)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h	2011-12-14 21:25:01 UTC (rev 102817)
@@ -74,7 +74,8 @@
             , showFPSCounter(false)
             , showPlatformLayerTree(false)
             , refreshRate(0)
-            , perTilePainting(false) { }
+            , perTilePainting(false)
+            , partialSwapEnabled(false) { }
 
     bool acceleratePainting;
     bool compositeOffscreen;
@@ -82,6 +83,7 @@
     bool showPlatformLayerTree;
     double refreshRate;
     bool perTilePainting;
+    bool partialSwapEnabled;
 };
 
 // Provides information on an Impl's rendering capabilities back to the CCLayerTreeHost

Modified: trunk/Source/WebKit/chromium/ChangeLog (102816 => 102817)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-12-14 21:25:01 UTC (rev 102817)
@@ -1,3 +1,21 @@
+2011-12-14  Jonathan Backer  <[email protected]>
+
+        [chromium] Plumb through flag for enabling partial swap
+        https://bugs.webkit.org/show_bug.cgi?id=74513
+
+        Reviewed by James Robinson.
+
+        * public/WebSettings.h:
+        * public/platform/WebLayerTreeView.h:
+        (WebKit::WebLayerTreeView::Settings::Settings):
+        * src/WebLayerTreeView.cpp:
+        (WebKit::WebLayerTreeView::Settings::operator CCSettings):
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setPartialSwapEnabled):
+        * src/WebSettingsImpl.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
 2011-12-14  Peter Beverloo  <[email protected]>
 
         [Chromium] Roll chromium DEPS (r113807 -> r114356)

Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (102816 => 102817)


--- trunk/Source/WebKit/chromium/public/WebSettings.h	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/public/WebSettings.h	2011-12-14 21:25:01 UTC (rev 102817)
@@ -135,6 +135,7 @@
     virtual void setVisualWordMovementEnabled(bool) = 0;
     virtual void setAcceleratedPaintingEnabled(bool) = 0;
     virtual void setPerTilePaintingEnabled(bool) = 0;
+    virtual void setPartialSwapEnabled(bool) = 0;
 
 protected:
     ~WebSettings() { }

Modified: trunk/Source/WebKit/chromium/public/platform/WebLayerTreeView.h (102816 => 102817)


--- trunk/Source/WebKit/chromium/public/platform/WebLayerTreeView.h	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/public/platform/WebLayerTreeView.h	2011-12-14 21:25:01 UTC (rev 102817)
@@ -47,12 +47,14 @@
             : acceleratePainting(false)
             , compositeOffscreen(false)
             , showFPSCounter(false)
-            , showPlatformLayerTree(false) { }
+            , showPlatformLayerTree(false)
+            , partialSwapEnabled(false) { }
 
         bool acceleratePainting;
         bool compositeOffscreen;
         bool showFPSCounter;
         bool showPlatformLayerTree;
+        bool partialSwapEnabled;
 #if WEBKIT_IMPLEMENTATION
         operator WebCore::CCSettings() const;
 #endif

Modified: trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp (102816 => 102817)


--- trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp	2011-12-14 21:25:01 UTC (rev 102817)
@@ -42,6 +42,7 @@
     settings.compositeOffscreen = compositeOffscreen;
     settings.showFPSCounter = showFPSCounter;
     settings.showPlatformLayerTree = showPlatformLayerTree;
+    settings.partialSwapEnabled = partialSwapEnabled;
 
     // FIXME: showFPSCounter / showPlatformLayerTree aren't supported currently.
     settings.showFPSCounter = false;

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (102816 => 102817)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2011-12-14 21:25:01 UTC (rev 102817)
@@ -507,4 +507,9 @@
     m_settings->setPerTileDrawingEnabled(enabled);
 }
 
+void WebSettingsImpl::setPartialSwapEnabled(bool enabled)
+{
+    m_settings->setPartialSwapEnabled(enabled);
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.h (102816 => 102817)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2011-12-14 21:25:01 UTC (rev 102817)
@@ -130,6 +130,7 @@
     virtual void setShouldDisplayTextDescriptions(bool);
     virtual void setAcceleratedPaintingEnabled(bool);
     virtual void setPerTilePaintingEnabled(bool);
+    virtual void setPartialSwapEnabled(bool);
 
 private:
     WebCore::Settings* m_settings;

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (102816 => 102817)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-12-14 21:21:38 UTC (rev 102816)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-12-14 21:25:01 UTC (rev 102817)
@@ -2950,6 +2950,7 @@
             ccSettings.refreshRate = defaultRefreshRate;
 
         ccSettings.perTilePainting = page()->settings()->perTileDrawingEnabled();
+        ccSettings.partialSwapEnabled = page()->settings()->partialSwapEnabled();
 
         m_nonCompositedContentHost = NonCompositedContentHost::create(WebViewImplContentPainter::create(this));
         m_layerTreeHost = CCLayerTreeHost::create(this, ccSettings);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to