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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 497143002: Revert of Directly composited images are images: ASSERT that (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index ea2e8e59d2a65b85ebcc07f7c934bc5bf7ee86d6..1924a3268a64f8c9bdbe32b0526ef477db51102e 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -457,7 +457,7 @@
updateBackgroundColor();
- if (renderer->isImage() && isDirectlyCompositedImage())
+ if (isDirectlyCompositedImage())
updateImageContents();
if (WebLayer* layer = platformLayerForPlugin(renderer)) {
@@ -1698,7 +1698,7 @@
if (paintsIntoCompositedAncestor() || m_owningLayer.isReflection())
return false;
- if (renderer()->isImage() && isDirectlyCompositedImage())
+ if (isDirectlyCompositedImage())
return false;
RenderObject* renderObject = renderer();
@@ -1742,10 +1742,9 @@
// that require painting. Direct compositing saves backing store.
bool CompositedLayerMapping::isDirectlyCompositedImage() const
{
- ASSERT(renderer()->isImage());
-
RenderObject* renderObject = renderer();
- if (m_owningLayer.hasBoxDecorationsOrBackground() || renderObject->hasClip())
+
+ if (!renderObject->isImage() || m_owningLayer.hasBoxDecorationsOrBackground() || renderObject->hasClip())
return false;
RenderImage* imageRenderer = toRenderImage(renderObject);
@@ -1792,8 +1791,6 @@
// This is a no-op if the layer doesn't have an inner layer for the image.
m_graphicsLayer->setContentsToImage(image);
-
- // Prevent double-drawing: https://bugs.webkit.org/show_bug.cgi?id=58632
updateDrawsContent();
// Image animation is "lazy", in that it automatically stops unless someone is drawing
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698