[chromium] Compare filters on impl thread when setting them, and test setting in...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 01:34:36 +0000 (01:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Feb 2012 01:34:36 +0000 (01:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78643

Patch by Dana Jansens <danakj@chromium.org> on 2012-02-14
Reviewed by James Robinson.

Source/WebCore:

Add setFilters() coverage to CCLayerImplTest.cpp

* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::setFilters):

Source/WebKit/chromium:

* tests/CCLayerImplTest.cpp:
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerImplTest.cpp

index 6ad88a1..e087ea0 100644 (file)
@@ -1,3 +1,15 @@
+2012-02-14  Dana Jansens  <danakj@chromium.org>
+
+        [chromium] Compare filters on impl thread when setting them, and test setting in unit tests
+        https://bugs.webkit.org/show_bug.cgi?id=78643
+
+        Reviewed by James Robinson.
+
+        Add setFilters() coverage to CCLayerImplTest.cpp
+
+        * platform/graphics/chromium/cc/CCLayerImpl.cpp:
+        (WebCore::CCLayerImpl::setFilters):
+
 2012-02-14  Ryosuke Niwa  <rniwa@webkit.org>
 
         Crash in deleteInsignificantText
index 0bfb737..a136167 100644 (file)
@@ -385,6 +385,9 @@ void CCLayerImpl::setBackgroundCoversViewport(bool backgroundCoversViewport)
 
 void CCLayerImpl::setFilters(const FilterOperations& filters)
 {
+    if (m_filters == filters)
+        return;
+
     m_filters = filters;
     noteLayerPropertyChangedForSubtree();
 }
index 59538be..ea1e00f 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-14  Dana Jansens  <danakj@chromium.org>
+
+        [chromium] Compare filters on impl thread when setting them, and test setting in unit tests
+        https://bugs.webkit.org/show_bug.cgi?id=78643
+
+        Reviewed by James Robinson.
+
+        * tests/CCLayerImplTest.cpp:
+        (WebCore::TEST):
+
 2012-02-14  Ramya Chandrasekaran  <cramya@google.com>
 
         Last character display for passwords in Android.
index 27728cb..16a25e1 100644 (file)
@@ -88,10 +88,13 @@ TEST(CCLayerImplTest, verifyLayerChangesAreTrackedProperly)
     Color arbitraryColor = Color(10, 20, 30);
     TransformationMatrix arbitraryTransform;
     arbitraryTransform.scale3d(0.1, 0.2, 0.3);
+    FilterOperations arbitraryFilters;
+    arbitraryFilters.operations().append(BasicComponentTransferFilterOperation::create(0.5, FilterOperation::OPACITY));
 
     // Changing these properties affects the entire subtree of layers.
     EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setAnchorPoint(arbitraryFloatPoint));
     EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setAnchorPointZ(arbitraryNumber));
+    EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setFilters(arbitraryFilters));
     EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setMaskLayer(dummyMask));
     EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setMasksToBounds(true));
     EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->setOpaque(true));