<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[190998] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/190998">190998</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-10-13 11:46:53 -0700 (Tue, 13 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add debug settings for using giant tiles (4096x4096)
https://bugs.webkit.org/show_bug.cgi?id=149977
&lt;rdar://problem/23017093&gt;

Patch by Said Abou-Hallawa &lt;sabouhallawa@apple.com&gt; on 2015-10-13
Reviewed by Tim Horton.

Source/WebCore:

Instead of creating the GraphicsLayer with a fixed size 512x512, we need
to read the useGiantTiles setting. If its value is true, we set the layer
tileSize to 4096x4096.

* page/Settings.in:
Define the name of the setting and its default value.

* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::tileSize):
Define tileSize() in the base class GraphicsLayerClient. This is going to
be overridden RenderLayerBacking.

* platform/graphics/TiledBacking.h:
(WebCore::defaultTileSize):
Define the default tileSize which will depend on the useGiantTiles
setting.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerTileSize):
Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
in our case.

* platform/graphics/ca/GraphicsLayerCA.h:
Override base class function PlatformCALayerClient::PlatformCALayerClient().

* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerTileSize):
Define platformCALayerTileSize() in the base class PlatformCALayerClient.
This is going to be overridden GraphicsLayerCA.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
No need for the member m_tileSize.

(WebCore::TileController::computeTileCoverageRect):
Use the function tileSize() instead of using the static values.

(WebCore::TileController::tileSize):
The tileSize will be retrieved from the owning graphics layer.

* platform/graphics/ca/TileController.h:
No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
Use the function tileSize() instead of using the static values.

(WebCore::RenderLayerBacking::tileSize):
Override base class function GraphicsLayerClient::tileSize().

* rendering/RenderLayerBacking.h:
Define the concrete method RenderLayerBacking::tilSize().

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetUseGiantTiles):
(WKPreferencesGetUseGiantTiles):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth">trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTiledBackingh">trunk/Source/WebCore/platform/graphics/TiledBacking.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCALayerClienth">trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaTileControllercpp">trunk/Source/WebCore/platform/graphics/ca/TileController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaTileControllerh">trunk/Source/WebCore/platform/graphics/ca/TileController.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingh">trunk/Source/WebCore/rendering/RenderLayerBacking.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesDefinitionsh">trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/ChangeLog        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2015-10-13  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
+
+        Add debug settings for using giant tiles (4096x4096)
+        https://bugs.webkit.org/show_bug.cgi?id=149977
+        &lt;rdar://problem/23017093&gt;
+
+        Reviewed by Tim Horton.
+
+        Instead of creating the GraphicsLayer with a fixed size 512x512, we need
+        to read the useGiantTiles setting. If its value is true, we set the layer
+        tileSize to 4096x4096.
+
+        * page/Settings.in:
+        Define the name of the setting and its default value.
+        
+        * platform/graphics/GraphicsLayerClient.h:
+        (WebCore::GraphicsLayerClient::tileSize):
+        Define tileSize() in the base class GraphicsLayerClient. This is going to
+        be overridden RenderLayerBacking.
+        
+        * platform/graphics/TiledBacking.h:
+        (WebCore::defaultTileSize):
+        Define the default tileSize which will depend on the useGiantTiles
+        setting.
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::platformCALayerTileSize):
+        Implement the virtual function GraphicsLayerCA::platformCALayerTileSize().
+        It passes the call to client GraphicsLayerClient which can be RenderLayerBacking
+        in our case.
+
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        Override base class function PlatformCALayerClient::PlatformCALayerClient().
+
+        * platform/graphics/ca/PlatformCALayerClient.h:
+        (WebCore::PlatformCALayerClient::platformCALayerTileSize):
+        Define platformCALayerTileSize() in the base class PlatformCALayerClient.
+        This is going to be overridden GraphicsLayerCA.
+
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::TileController):
+        No need for the member m_tileSize.
+        
+        (WebCore::TileController::computeTileCoverageRect):
+        Use the function tileSize() instead of using the static values.
+        
+        (WebCore::TileController::tileSize):
+        The tileSize will be retrieved from the owning graphics layer.
+        
+        * platform/graphics/ca/TileController.h:
+        No need for the member m_tileSize. The tileSize will be retrieved from the owning graphics layer.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
+        Use the function tileSize() instead of using the static values.
+        
+        (WebCore::RenderLayerBacking::tileSize):
+        Override base class function GraphicsLayerClient::tileSize().
+        
+        * rendering/RenderLayerBacking.h:
+        Define the concrete method RenderLayerBacking::tilSize().
+
</ins><span class="cx"> 2015-10-13  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Try to fix ENABLE(DETAILS_ELEMENT) with SHADOW_DOM disabled.
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/page/Settings.in        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -201,6 +201,8 @@
</span><span class="cx"> 
</span><span class="cx"> subpixelCSSOMElementMetricsEnabled initial=false
</span><span class="cx"> 
</span><ins>+useGiantTiles initial=false
+
</ins><span class="cx"> mediaSourceEnabled initial=true, conditional=MEDIA_SOURCE
</span><span class="cx"> 
</span><span class="cx"> # FIXME: Rename to allowMultiElementImplicitFormSubmission once we upstream the iOS changes to WebView.mm.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef GraphicsLayerClient_h
</span><span class="cx"> #define GraphicsLayerClient_h
</span><span class="cx"> 
</span><ins>+#include &quot;IntSize.h&quot;
+#include &quot;TiledBacking.h&quot;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -118,6 +120,8 @@
</span><span class="cx">     virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const { return false; }
</span><span class="cx">     virtual bool shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const { return true; }
</span><span class="cx"> 
</span><ins>+    virtual IntSize tileSize() const { return defaultTileSize(); }
+
</ins><span class="cx">     virtual bool needsPixelAligment() const { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual bool needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack(const GraphicsLayer&amp;) const { return false; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTiledBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TiledBacking.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -28,9 +28,27 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static const int defaultTileWidth = 512;
-static const int defaultTileHeight = 512;
</del><ins>+enum TileSizeMode {
+    StandardTileSizeMode,
+    GiantTileSizeMode
+};
</ins><span class="cx"> 
</span><ins>+inline static IntSize defaultTileSize(TileSizeMode tileSizeMode = StandardTileSizeMode)
+{
+    static const int kTiledLayerTileSize = 512;
+
+    // This is an experimental value for debugging and evaluating the overhead which may be
+    // incurred due to a large tile size.
+    static const int kGiantTiledLayerTileSize = 4096;
+
+    if (tileSizeMode == GiantTileSizeMode)
+        return IntSize(kGiantTiledLayerTileSize, kGiantTiledLayerTileSize);
+
+    return IntSize(kTiledLayerTileSize, kTiledLayerTileSize);
+}
+
+class FloatPoint;
+class FloatRect;
</ins><span class="cx"> class IntRect;
</span><span class="cx"> class PlatformCALayer;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -1449,6 +1449,11 @@
</span><span class="cx">     return client().shouldTemporarilyRetainTileCohorts(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntSize GraphicsLayerCA::platformCALayerTileSize() const
+{
+    return client().tileSize();
+}
+
</ins><span class="cx"> static PlatformCALayer::LayerType layerTypeForCustomBackdropAppearance(GraphicsLayer::CustomAppearance appearance)
</span><span class="cx"> {
</span><span class="cx">     return appearance == GraphicsLayer::LightBackdropAppearance ? PlatformCALayer::LayerTypeLightSystemBackdropLayer : PlatformCALayer::LayerTypeDarkSystemBackdropLayer;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -47,10 +47,6 @@
</span><span class="cx"> 
</span><span class="cx"> class GraphicsLayerCA : public GraphicsLayer, public PlatformCALayerClient {
</span><span class="cx"> public:
</span><del>-    // The width and height of a single tile in a tiled layer. Should be large enough to
-    // avoid lots of small tiles (and therefore lots of drawing callbacks), but small enough
-    // to keep the overall tile cost low.
-    static const int kTiledLayerTileSize = 512;
</del><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT explicit GraphicsLayerCA(Type, GraphicsLayerClient&amp;);
</span><span class="cx">     WEBCORE_EXPORT virtual ~GraphicsLayerCA();
</span><span class="lines">@@ -199,6 +195,7 @@
</span><span class="cx">     WEBCORE_EXPORT virtual float platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const override;
</span><span class="cx">     WEBCORE_EXPORT virtual bool platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const override;
</span><span class="cx">     WEBCORE_EXPORT virtual bool platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const override;
</span><ins>+    WEBCORE_EXPORT virtual IntSize platformCALayerTileSize() const override;
</ins><span class="cx"> 
</span><span class="cx">     virtual bool isCommittingChanges() const override { return m_isCommittingChanges; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCALayerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -60,6 +60,8 @@
</span><span class="cx">     virtual bool platformCALayerShouldAggressivelyRetainTiles(PlatformCALayer*) const { return false; }
</span><span class="cx">     virtual bool platformCALayerShouldTemporarilyRetainTileCohorts(PlatformCALayer*) const { return true; }
</span><span class="cx"> 
</span><ins>+    virtual IntSize platformCALayerTileSize() const { return defaultTileSize(); }
+
</ins><span class="cx">     virtual bool isCommittingChanges() const { return false; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaTileControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.cpp (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -54,7 +54,6 @@
</span><span class="cx"> TileController::TileController(PlatformCALayer* rootPlatformLayer)
</span><span class="cx">     : m_tileCacheLayer(rootPlatformLayer)
</span><span class="cx">     , m_tileGrid(std::make_unique&lt;TileGrid&gt;(*this))
</span><del>-    , m_tileSize(defaultTileWidth, defaultTileHeight)
</del><span class="cx">     , m_tileRevalidationTimer(*this, &amp;TileController::tileRevalidationTimerFired)
</span><span class="cx">     , m_zoomedOutContentsScale(0)
</span><span class="cx">     , m_deviceScaleFactor(owningGraphicsLayer()-&gt;platformCALayerDeviceScaleFactor())
</span><span class="lines">@@ -328,8 +327,8 @@
</span><span class="cx">     if (m_tileCoverage == CoverageForVisibleArea || MemoryPressureHandler::singleton().isUnderMemoryPressure())
</span><span class="cx">         return visibleRect;
</span><span class="cx"> 
</span><del>-    double horizontalMargin = defaultTileWidth / contentsScale;
-    double verticalMargin = defaultTileHeight / contentsScale;
</del><ins>+    double horizontalMargin = tileSize().width() / contentsScale;
+    double verticalMargin = tileSize().height() / contentsScale;
</ins><span class="cx"> 
</span><span class="cx">     double currentTime = monotonicallyIncreasingTime();
</span><span class="cx">     double timeDelta = currentTime - m_velocity.lastUpdateTime;
</span><span class="lines">@@ -428,6 +427,11 @@
</span><span class="cx">     return owningGraphicsLayer()-&gt;platformCALayerShouldTemporarilyRetainTileCohorts(m_tileCacheLayer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntSize TileController::tileSize() const
+{
+    return owningGraphicsLayer()-&gt;platformCALayerTileSize();
+}
+
</ins><span class="cx"> void TileController::clearZoomedOutTileGrid()
</span><span class="cx"> {
</span><span class="cx">     m_zoomedOutTileGrid = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaTileControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/TileController.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     float tileDebugBorderWidth() const { return m_tileDebugBorderWidth; }
</span><span class="cx">     ScrollingModeIndication indicatorMode() const { return m_indicatorMode; }
</span><span class="cx"> 
</span><del>-    virtual IntSize tileSize() const override { return m_tileSize; }
</del><ins>+    virtual IntSize tileSize() const override;
</ins><span class="cx">     virtual IntRect bounds() const override;
</span><span class="cx">     virtual IntRect boundsWithoutMargin() const override;
</span><span class="cx">     virtual bool hasMargins() const override;
</span><span class="lines">@@ -175,7 +175,6 @@
</span><span class="cx">     std::unique_ptr&lt;TileGrid&gt; m_tileGrid;
</span><span class="cx">     std::unique_ptr&lt;TileGrid&gt; m_zoomedOutTileGrid;
</span><span class="cx"> 
</span><del>-    IntSize m_tileSize;
</del><span class="cx">     FloatRect m_visibleRect; // Only used for scroll performance logging.
</span><span class="cx">     FloatRect m_coverageRect;
</span><span class="cx">     IntRect m_boundsAtLastRevalidate;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -223,8 +223,8 @@
</span><span class="cx">     if (!m_usingTiledCacheLayer)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    int marginLeftAndRightSize = hasExtendedBackgroundOnLeftAndRight ? defaultTileWidth : 0;
-    int marginTopAndBottomSize = hasExtendedBackgroundOnTopAndBottom ? defaultTileHeight : 0;
</del><ins>+    int marginLeftAndRightSize = hasExtendedBackgroundOnLeftAndRight ? tileSize().width() : 0;
+    int marginTopAndBottomSize = hasExtendedBackgroundOnTopAndBottom ? tileSize().height() : 0;
</ins><span class="cx">     tiledBacking()-&gt;setTileMargins(marginTopAndBottomSize, marginTopAndBottomSize, marginLeftAndRightSize, marginLeftAndRightSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2461,6 +2461,12 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntSize RenderLayerBacking::tileSize() const
+{
+    TileSizeMode tileSizeMode = renderer().frame().page()-&gt;settings().useGiantTiles() ? GiantTileSizeMode : StandardTileSizeMode;
+    return defaultTileSize(tileSizeMode);
+}
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> void RenderLayerBacking::verifyNotPainting()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -213,6 +213,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool shouldAggressivelyRetainTiles(const GraphicsLayer*) const override;
</span><span class="cx">     virtual bool shouldTemporarilyRetainTileCohorts(const GraphicsLayer*) const override;
</span><ins>+    virtual IntSize tileSize() const override;
</ins><span class="cx">     virtual bool needsPixelAligment() const override { return !m_isMainFrameRenderViewLayer; }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-10-13  Said Abou-Hallawa  &lt;sabouhallawa@apple.com&gt;
+
+        Add debug settings for using giant tiles (4096x4096)
+        https://bugs.webkit.org/show_bug.cgi?id=149977
+        &lt;rdar://problem/23017093&gt;
+
+        Reviewed by Tim Horton.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetUseGiantTiles):
+        (WKPreferencesGetUseGiantTiles):
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
</ins><span class="cx"> 2015-10-13  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Avoid crash due to invalid screen bounds
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesDefinitionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -188,6 +188,7 @@
</span><span class="cx">     macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true) \
</span><span class="cx">     macro(SimpleLineLayoutEnabled, simpleLineLayoutEnabled, Bool, bool, true) \
</span><span class="cx">     macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false) \
</span><ins>+    macro(UseGiantTiles, useGiantTiles, Bool, bool, false) \
</ins><span class="cx">     macro(MediaStreamEnabled, mediaStreamEnabled, Bool, bool, false) \
</span><span class="cx">     macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false) \
</span><span class="cx">     macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -1217,6 +1217,16 @@
</span><span class="cx">     return toImpl(preferencesRef)-&gt;subpixelCSSOMElementMetricsEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WKPreferencesSetUseGiantTiles(WKPreferencesRef preferencesRef, bool flag)
+{
+    toImpl(preferencesRef)-&gt;setUseGiantTiles(flag);
+}
+
+bool WKPreferencesGetUseGiantTiles(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;useGiantTiles();
+}
+
</ins><span class="cx"> void WKPreferencesSetMediaStreamEnabled(WKPreferencesRef preferencesRef, bool enabled)
</span><span class="cx"> {
</span><span class="cx">     toImpl(preferencesRef)-&gt;setMediaStreamEnabled(enabled);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesRefPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -313,6 +313,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef, bool);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef);
</span><span class="cx"> 
</span><ins>+// Defaults to false.
+WK_EXPORT void WKPreferencesSetUseGiantTiles(WKPreferencesRef, bool);
+WK_EXPORT bool WKPreferencesGetUseGiantTiles(WKPreferencesRef);
+
</ins><span class="cx"> WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef);
</span><span class="cx"> 
</span><span class="cx"> // Defaults to false.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (190997 => 190998)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-10-13 18:35:31 UTC (rev 190997)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-10-13 18:46:53 UTC (rev 190998)
</span><span class="lines">@@ -2738,6 +2738,7 @@
</span><span class="cx">     settings.setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey()));
</span><span class="cx">     settings.setShowTiledScrollingIndicator(store.getBoolValueForKey(WebPreferencesKey::tiledScrollingIndicatorVisibleKey()));
</span><span class="cx">     settings.setVisibleDebugOverlayRegions(store.getUInt32ValueForKey(WebPreferencesKey::visibleDebugOverlayRegionsKey()));
</span><ins>+    settings.setUseGiantTiles(store.getBoolValueForKey(WebPreferencesKey::useGiantTilesKey()));
</ins><span class="cx">     
</span><span class="cx">     settings.setAggressiveTileRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::aggressiveTileRetentionEnabledKey()));
</span><span class="cx">     settings.setTemporaryTileCohortRetentionEnabled(store.getBoolValueForKey(WebPreferencesKey::temporaryTileCohortRetentionEnabledKey()));
</span></span></pre>
</div>
</div>

</body>
</html>