Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2063)

Unified Diff: Source/web/WebPluginContainerImpl.cpp

Issue 328553004: Get rid of scheduleSVGFilterLayerUpdateHack call for plugins. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: get rid of style recalc Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/style/StyleRareNonInheritedData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPluginContainerImpl.cpp
diff --git a/Source/web/WebPluginContainerImpl.cpp b/Source/web/WebPluginContainerImpl.cpp
index 345eff5e97447b5ef2ed7a8101f562e9aa2d1248..40e90ed3df3261f3477397900a077d7f5377b05c 100644
--- a/Source/web/WebPluginContainerImpl.cpp
+++ b/Source/web/WebPluginContainerImpl.cpp
@@ -65,6 +65,7 @@
#include "core/plugins/PluginOcclusionSupport.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/RenderBox.h"
+#include "core/rendering/RenderLayer.h"
#include "platform/HostWindow.h"
#include "platform/KeyboardCodes.h"
#include "platform/PlatformGestureEvent.h"
@@ -288,15 +289,27 @@ void WebPluginContainerImpl::setWebLayer(WebLayer* layer)
if (m_webLayer == layer)
return;
- // If anyone of the layers is null we need to switch between hardware
- // and software compositing.
- if (!m_webLayer || !layer)
- m_element->scheduleSVGFilterLayerUpdateHack();
if (m_webLayer)
GraphicsLayer::unregisterContentsLayer(m_webLayer);
if (layer)
GraphicsLayer::registerContentsLayer(layer);
+
+ // If anyone of the layers is null we need to switch between hardware
+ // and software compositing.
+ bool needsCompositingUpdate = !m_webLayer || !layer;
+
m_webLayer = layer;
+
+ if (!needsCompositingUpdate)
+ return;
+
+ m_element->setNeedsCompositingUpdate();
+ // Being composited or not affects the self painting layer bit
+ // on the RenderLayer.
+ if (RenderPart* renderer = m_element->renderPart()) {
+ RELEASE_ASSERT(renderer->hasLayer());
+ renderer->layer()->updateSelfPaintingLayer();
+ }
}
bool WebPluginContainerImpl::supportsPaginatedPrint() const
« no previous file with comments | « Source/core/rendering/style/StyleRareNonInheritedData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698