Title: [134001] trunk/Source/WebKit2
- Revision
- 134001
- Author
- commit-qu...@webkit.org
- Date
- 2012-11-08 20:21:16 -0800 (Thu, 08 Nov 2012)
Log Message
Coordinated Graphics: Don't send the messages for releasing resources during purging.
https://bugs.webkit.org/show_bug.cgi?id=101685
Patch by Huang Dongsung <luxte...@company100.net> on 2012-11-08
Reviewed by Noam Rosenthal.
We don't need to send the messages related to releasing resources to UI Process
during purging, because UI Process already had removed all resources.
This patch gives us reducing slight messaging overhead and increasing readability.
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::purgeReleasedImages):
(WebKit::LayerTreeCoordinator::removeTile):
(WebKit::LayerTreeCoordinator::removeUpdateAtlas):
(WebKit::LayerTreeCoordinator::purgeBackingStores):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (134000 => 134001)
--- trunk/Source/WebKit2/ChangeLog 2012-11-09 04:18:29 UTC (rev 134000)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-09 04:21:16 UTC (rev 134001)
@@ -1,3 +1,25 @@
+2012-11-08 Huang Dongsung <luxte...@company100.net>
+
+ Coordinated Graphics: Don't send the messages for releasing resources during purging.
+ https://bugs.webkit.org/show_bug.cgi?id=101685
+
+ Reviewed by Noam Rosenthal.
+
+ We don't need to send the messages related to releasing resources to UI Process
+ during purging, because UI Process already had removed all resources.
+ This patch gives us reducing slight messaging overhead and increasing readability.
+
+ * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
+ (WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+ (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+ (WebKit::LayerTreeCoordinator::purgeReleasedImages):
+ (WebKit::LayerTreeCoordinator::removeTile):
+ (WebKit::LayerTreeCoordinator::removeUpdateAtlas):
+ (WebKit::LayerTreeCoordinator::purgeBackingStores):
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+ (LayerTreeCoordinator):
+
2012-11-08 KyungTae Kim <ktf....@samsung.com>
[WK2] Unused parameters on LayerTreeRenderer.cpp
Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp (134000 => 134001)
--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp 2012-11-09 04:18:29 UTC (rev 134000)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp 2012-11-09 04:21:16 UTC (rev 134001)
@@ -201,6 +201,7 @@
void LayerTreeCoordinatorProxy::purgeBackingStores()
{
+ m_surfaces.clear();
m_drawingAreaProxy->page()->process()->send(Messages::LayerTreeCoordinator::PurgeBackingStores(), m_drawingAreaProxy->page()->pageID());
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp (134000 => 134001)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp 2012-11-09 04:18:29 UTC (rev 134000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp 2012-11-09 04:21:16 UTC (rev 134001)
@@ -47,6 +47,7 @@
#include <WebCore/RenderLayerCompositor.h>
#include <WebCore/RenderView.h>
#include <WebCore/Settings.h>
+#include <wtf/TemporaryChange.h>
using namespace WebCore;
@@ -72,6 +73,7 @@
: LayerTreeHost(webPage)
, m_notifyAfterScheduledLayerFlush(false)
, m_isValid(true)
+ , m_isPurging(false)
, m_waitingForUIProcess(true)
, m_isSuspended(false)
, m_contentsScale(1)
@@ -449,8 +451,10 @@
void LayerTreeCoordinator::purgeReleasedImages()
{
- for (size_t i = 0; i < m_releasedDirectlyCompositedImages.size(); ++i)
- m_webPage->send(Messages::LayerTreeCoordinatorProxy::DestroyDirectlyCompositedImage(m_releasedDirectlyCompositedImages[i]));
+ if (!m_isPurging) {
+ for (size_t i = 0; i < m_releasedDirectlyCompositedImages.size(); ++i)
+ m_webPage->send(Messages::LayerTreeCoordinatorProxy::DestroyDirectlyCompositedImage(m_releasedDirectlyCompositedImages[i]));
+ }
m_releasedDirectlyCompositedImages.clear();
}
@@ -604,6 +608,8 @@
void LayerTreeCoordinator::removeTile(WebLayerID layerID, int tileID)
{
+ if (m_isPurging)
+ return;
m_shouldSyncFrame = true;
m_webPage->send(Messages::LayerTreeCoordinatorProxy::RemoveTileForLayer(layerID, tileID));
}
@@ -615,6 +621,8 @@
void LayerTreeCoordinator::removeUpdateAtlas(int atlasID)
{
+ if (m_isPurging)
+ return;
m_webPage->send(Messages::LayerTreeCoordinatorProxy::RemoveUpdateAtlas(atlasID));
}
@@ -690,6 +698,8 @@
void LayerTreeCoordinator::purgeBackingStores()
{
+ TemporaryChange<bool> purgingToggle(m_isPurging, true);
+
HashSet<WebCore::CoordinatedGraphicsLayer*>::iterator end = m_registeredLayers.end();
for (HashSet<WebCore::CoordinatedGraphicsLayer*>::iterator it = m_registeredLayers.begin(); it != end; ++it)
(*it)->purgeBackingStores();
Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h (134000 => 134001)
--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h 2012-11-09 04:18:29 UTC (rev 134000)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h 2012-11-09 04:21:16 UTC (rev 134001)
@@ -153,6 +153,8 @@
bool m_notifyAfterScheduledLayerFlush;
bool m_isValid;
+ // We don't send the messages related to releasing resources to UI Process during purging, because UI Process already had removed all resources.
+ bool m_isPurging;
bool m_waitingForUIProcess;
bool m_isSuspended;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes