Title: [198520] trunk/Source/WebCore
Revision
198520
Author
[email protected]
Date
2016-03-22 00:21:13 -0700 (Tue, 22 Mar 2016)

Log Message

[TexMap] Shrink-to-fit the CompositingCoordinator's update atlases vector after cleanup
https://bugs.webkit.org/show_bug.cgi?id=155719

Reviewed by Carlos Garcia Campos.

Shrink the Vector object containing the cached UpdateAtlas objects
after the inactive ones are removed. This way the capacity of the
Vector is kept under control, preventing unnecessary waste of memory.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198519 => 198520)


--- trunk/Source/WebCore/ChangeLog	2016-03-22 03:48:28 UTC (rev 198519)
+++ trunk/Source/WebCore/ChangeLog	2016-03-22 07:21:13 UTC (rev 198520)
@@ -1,3 +1,17 @@
+2016-03-22  Zan Dobersek  <[email protected]>
+
+        [TexMap] Shrink-to-fit the CompositingCoordinator's update atlases vector after cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=155719
+
+        Reviewed by Carlos Garcia Campos.
+
+        Shrink the Vector object containing the cached UpdateAtlas objects
+        after the inactive ones are removed. This way the capacity of the
+        Vector is kept under control, preventing unnecessary waste of memory.
+
+        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
+        (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
+
 2016-03-21  Brent Fulgham  <[email protected]>
 
         Improve SharedBuffer testing

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp (198519 => 198520)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp	2016-03-22 03:48:28 UTC (rev 198519)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp	2016-03-22 07:21:13 UTC (rev 198520)
@@ -420,6 +420,8 @@
     if (!foundActiveAtlasForRootContentsLayer && atlasToKeepAnyway)
         m_updateAtlases.append(atlasToKeepAnyway.release());
 
+    m_updateAtlases.shrinkToFit();
+
     if (m_updateAtlases.size() <= 1)
         m_releaseInactiveAtlasesTimer.stop();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to