Add debug settings for using giant tiles (4096x4096)
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 18:46:53 +0000 (18:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 18:46:53 +0000 (18:46 +0000)
commit46de40f5906ba62c1484b6ec4379553b13657263
tree0cc01e1a6951fc2a13613aeffc0c5c2a6b7c8a25
parented5c386fd436f69a88cfb7fb32cc9a04b5aeb138
Add debug settings for using giant tiles (4096x4096)
https://bugs.webkit.org/show_bug.cgi?id=149977
<rdar://problem/23017093>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> 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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebCore/platform/graphics/GraphicsLayerClient.h
Source/WebCore/platform/graphics/TiledBacking.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h
Source/WebCore/platform/graphics/ca/TileController.cpp
Source/WebCore/platform/graphics/ca/TileController.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp