Title: [183196] trunk/Source/WebCore
- Revision
- 183196
- Author
- [email protected]
- Date
- 2015-04-23 10:59:58 -0700 (Thu, 23 Apr 2015)
Log Message
Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
https://bugs.webkit.org/show_bug.cgi?id=144108
Reviewed by Dean Jackson.
No need for the m_isPageTiledBackingLayer data member. We can just check the layer
type instead.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::isPageTiledBackingLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (183195 => 183196)
--- trunk/Source/WebCore/ChangeLog 2015-04-23 17:52:21 UTC (rev 183195)
+++ trunk/Source/WebCore/ChangeLog 2015-04-23 17:59:58 UTC (rev 183196)
@@ -1,3 +1,23 @@
+2015-04-23 Simon Fraser <[email protected]>
+
+ Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
+ https://bugs.webkit.org/show_bug.cgi?id=144108
+
+ Reviewed by Dean Jackson.
+
+ No need for the m_isPageTiledBackingLayer data member. We can just check the layer
+ type instead.
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::initialize):
+ (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
+ (WebCore::GraphicsLayerCA::updateContentsScale):
+ (WebCore::GraphicsLayerCA::getDebugBorderInfo):
+ (WebCore::GraphicsLayerCA::requiresTiledLayer):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::isPageTiledBackingLayer):
+
2015-04-23 Brady Eidson <[email protected]>
Content extension with oft-repeated rules can cause slowdown.
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (183195 => 183196)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-04-23 17:52:21 UTC (rev 183195)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-04-23 17:59:58 UTC (rev 183196)
@@ -352,7 +352,6 @@
GraphicsLayerCA::GraphicsLayerCA(Type layerType, GraphicsLayerClient& client)
: GraphicsLayer(layerType, client)
, m_contentsLayerPurpose(NoContentsLayer)
- , m_isPageTiledBackingLayer(false)
, m_needsFullRepaint(false)
, m_usingBackdropLayerType(false)
, m_uncommittedChanges(0)
@@ -362,9 +361,6 @@
void GraphicsLayerCA::initialize(Type layerType)
{
- if (layerType == Type::PageTiledBacking)
- m_isPageTiledBackingLayer = true;
-
PlatformCALayer::LayerType platformLayerType;
switch (layerType) {
case Type::Normal:
@@ -1312,7 +1308,7 @@
{
// The repaint counters are painted into the TileController tiles (which have no corresponding platform layer),
// so we don't want to overpaint the repaint counter when called with the TileController's own layer.
- if (m_isPageTiledBackingLayer && platformLayer)
+ if (isPageTiledBackingLayer() && platformLayer)
return false;
return isShowingRepaintCounter();
@@ -3069,7 +3065,7 @@
{
float contentsScale = pageScaleFactor * deviceScaleFactor();
- if (m_isPageTiledBackingLayer && tiledBacking()) {
+ if (isPageTiledBackingLayer() && tiledBacking()) {
float zoomedOutScale = m_client.zoomedOutPageScaleFactor() * deviceScaleFactor();
tiledBacking()->setZoomedOutContentsScale(zoomedOutScale);
}
@@ -3084,7 +3080,7 @@
if (tiledBacking()) {
// Scale change may swap in a different set of tiles changing the custom child layers.
- if (m_isPageTiledBackingLayer)
+ if (isPageTiledBackingLayer())
m_uncommittedChanges |= ChildrenChanged;
// Tiled backing repaints automatically on scale change.
return;
@@ -3127,7 +3123,7 @@
void GraphicsLayerCA::getDebugBorderInfo(Color& color, float& width) const
{
- if (m_isPageTiledBackingLayer) {
+ if (isPageTiledBackingLayer()) {
color = Color(0, 0, 128, 128); // tile cache layer: dark blue
width = 0.5;
return;
@@ -3205,7 +3201,7 @@
bool GraphicsLayerCA::requiresTiledLayer(float pageScaleFactor) const
{
- if (!m_drawsContent || m_isPageTiledBackingLayer)
+ if (!m_drawsContent || isPageTiledBackingLayer())
return false;
// FIXME: catch zero-size height or width here (or earlier)?
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (183195 => 183196)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2015-04-23 17:52:21 UTC (rev 183195)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2015-04-23 17:59:58 UTC (rev 183196)
@@ -267,6 +267,8 @@
WEBCORE_EXPORT virtual void setReplicatedByLayer(GraphicsLayer*) override;
+ WEBCORE_EXPORT virtual bool canThrottleLayerFlush() const override;
+
WEBCORE_EXPORT virtual void getDebugBorderInfo(Color&, float& width) const override;
WEBCORE_EXPORT virtual void dumpAdditionalProperties(TextStream&, int indent, LayerTreeAsTextBehavior) const override;
@@ -283,9 +285,9 @@
static FloatRect adjustTiledLayerVisibleRect(TiledBacking*, const FloatRect& oldVisibleRect, const FloatRect& newVisibleRect, const FloatSize& oldSize, const FloatSize& newSize);
bool recursiveVisibleRectChangeRequiresFlush(const TransformState&) const;
+
+ bool isPageTiledBackingLayer() const { return type() == Type::PageTiledBacking; }
- WEBCORE_EXPORT virtual bool canThrottleLayerFlush() const override;
-
// Used to track the path down the tree for replica layers.
struct ReplicaState {
static const size_t maxReplicaDepth = 16;
@@ -491,7 +493,6 @@
FloatSize m_sizeAtLastVisibleRectUpdate;
ContentsLayerPurpose m_contentsLayerPurpose;
- bool m_isPageTiledBackingLayer : 1;
bool m_needsFullRepaint : 1;
bool m_usingBackdropLayerType : 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes