Title: [114808] trunk/Source
Revision
114808
Author
dan...@chromium.org
Date
2012-04-20 17:27:46 -0700 (Fri, 20 Apr 2012)

Log Message

[chromium] Remove special case for recreating layers during sync
https://bugs.webkit.org/show_bug.cgi?id=84458

Reviewed by James Robinson.

Source/WebCore:

We no longer delete layers on the impl side, unless it is due to
deleting the layer on webkit side. So we will no longer have a
situation where we need to push properties from an old
LayerChromium to a new CCLayerImpl.

* platform/graphics/chromium/TreeSynchronizer.cpp:
(WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):

Source/WebKit/chromium:

* tests/TreeSynchronizerTest.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114807 => 114808)


--- trunk/Source/WebCore/ChangeLog	2012-04-21 00:22:56 UTC (rev 114807)
+++ trunk/Source/WebCore/ChangeLog	2012-04-21 00:27:46 UTC (rev 114808)
@@ -1,5 +1,20 @@
 2012-04-20  Dana Jansens  <dan...@chromium.org>
 
+        [chromium] Remove special case for recreating layers during sync
+        https://bugs.webkit.org/show_bug.cgi?id=84458
+
+        Reviewed by James Robinson.
+
+        We no longer delete layers on the impl side, unless it is due to
+        deleting the layer on webkit side. So we will no longer have a
+        situation where we need to push properties from an old
+        LayerChromium to a new CCLayerImpl.
+
+        * platform/graphics/chromium/TreeSynchronizer.cpp:
+        (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
+
+2012-04-20  Dana Jansens  <dan...@chromium.org>
+
         [chromium] WebFilterOperations API does not compile or dynamically link
         https://bugs.webkit.org/show_bug.cgi?id=84506
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/TreeSynchronizer.cpp (114807 => 114808)


--- trunk/Source/WebCore/platform/graphics/chromium/TreeSynchronizer.cpp	2012-04-21 00:22:56 UTC (rev 114807)
+++ trunk/Source/WebCore/platform/graphics/chromium/TreeSynchronizer.cpp	2012-04-21 00:27:46 UTC (rev 114808)
@@ -71,10 +71,8 @@
 {
     OwnPtr<CCLayerImpl> ccLayerImpl = oldLayers.take(layer->id());
 
-    if (!ccLayerImpl) {
+    if (!ccLayerImpl)
         ccLayerImpl = layer->createCCLayerImpl();
-        layer->setNonFastScrollableRegionChanged(); // We just created a fresh CCLayerImpl, so make sure we transfer the nonFastScrollableRegion.
-    }
 
     newLayers.set(layer->id(), ccLayerImpl.get());
     return ccLayerImpl.release();

Modified: trunk/Source/WebKit/chromium/ChangeLog (114807 => 114808)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-21 00:22:56 UTC (rev 114807)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-21 00:27:46 UTC (rev 114808)
@@ -1,3 +1,12 @@
+2012-04-20  Dana Jansens  <dan...@chromium.org>
+
+        [chromium] Remove special case for recreating layers during sync
+        https://bugs.webkit.org/show_bug.cgi?id=84458
+
+        Reviewed by James Robinson.
+
+        * tests/TreeSynchronizerTest.cpp:
+
 2012-04-20  Alec Flett  <alecfl...@chromium.org>
 
         IndexedDB: Support get/getKey(keyRange)

Modified: trunk/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp (114807 => 114808)


--- trunk/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp	2012-04-21 00:22:56 UTC (rev 114807)
+++ trunk/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp	2012-04-21 00:27:46 UTC (rev 114808)
@@ -197,29 +197,6 @@
     EXPECT_EQ(secondCCLayerId, ccLayerDestructionList[0]);
 }
 
-TEST(TreeSynchronizerTest, syncSimpleTreeWithNonFastScrollableRegionAndFreshLayer)
-{
-    DebugScopedSetImplThread impl;
-    Vector<int> ccLayerDestructionList;
-    Region testRegion(IntRect(0, 0, 1, 1));
-
-    RefPtr<LayerChromium> layerTreeRoot = MockLayerChromium::create(&ccLayerDestructionList);
-    layerTreeRoot->addChild(MockLayerChromium::create(&ccLayerDestructionList));
-    layerTreeRoot->addChild(MockLayerChromium::create(&ccLayerDestructionList));
-
-    // Create non-empty nonFastScrollableRegion in one of the children.
-    layerTreeRoot->children()[0]->setNonFastScrollableRegion(testRegion);
-
-    OwnPtr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), nullptr);
-    expectTreesAreIdentical(layerTreeRoot.get(), ccLayerTreeRoot.get());
-
-    ccLayerTreeRoot->removeAllChildren(); // Force these to be re-created on next sync.
-
-    // Synchronize again. After the sync the trees should be equivalent and we should have re-created one CCLayerImpl that has a non-empty nonFastScrollableRegion.
-    ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), ccLayerTreeRoot.release());
-    expectTreesAreIdentical(layerTreeRoot.get(), ccLayerTreeRoot.get());
-}
-
 TEST(TreeSynchronizerTest, syncSimpleTreeAndProperties)
 {
     DebugScopedSetImplThread impl;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to