[chromium] setNeedsCommit on non-composited host layers should trigger commit
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 01:17:49 +0000 (01:17 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Dec 2011 01:17:49 +0000 (01:17 +0000)
commit3c846abcb995a2a7c125edc911eae5ef96bce2cf
treedacaaadba0757e5a77e7593e11d586e9fb403f02
parente7994a0c694332d19e5de5d1bfbef8f1429fb3ac
[chromium] setNeedsCommit on non-composited host layers should trigger commit
https://bugs.webkit.org/show_bug.cgi?id=73711

Reviewed by James Robinson.

Source/WebCore:

Pipe non-composited content host syncs to setNeedsCommit.

Since now the NonCompositedContentHost generates setNeedsCommit, don't
call it unnecessarily, e.g. calling setBackgroundColor to the same
color each frame should not retrigger more commits.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setAnchorPoint):
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::setChildrenTransform):
(WebCore::GraphicsLayerChromium::setMasksToBounds):
(WebCore::GraphicsLayerChromium::setBackgroundColor):
(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::setOpacity):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::setAnchorPoint):
(WebCore::LayerChromium::setAnchorPointZ):
(WebCore::LayerChromium::setBackgroundColor):
(WebCore::LayerChromium::setMasksToBounds):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setOpacity):
(WebCore::LayerChromium::setOpaque):
(WebCore::LayerChromium::setPosition):
(WebCore::LayerChromium::setSublayerTransform):
(WebCore::LayerChromium::setTransform):
(WebCore::LayerChromium::setScrollPosition):
(WebCore::LayerChromium::setScrollable):
(WebCore::LayerChromium::setDoubleSided):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/NonCompositedContentHost.cpp:
(WebCore::NonCompositedContentHost::notifySyncRequired):
* platform/graphics/chromium/NonCompositedContentHost.h:

Source/WebKit/chromium:

Add some tests to make sure that modifying the noncomposited content
host triggers commits.

Properties that trigger setNeedsCommit should only do so when the
property changes. Additionally, make more property changes properly
trigger commits.

* tests/LayerChromiumTest.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerChromium.h
Source/WebCore/platform/graphics/chromium/NonCompositedContentHost.cpp
Source/WebCore/platform/graphics/chromium/NonCompositedContentHost.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/LayerChromiumTest.cpp