Chromium Code Reviews| Index: Source/core/rendering/CompositedLayerMapping.cpp |
| diff --git a/Source/core/rendering/CompositedLayerMapping.cpp b/Source/core/rendering/CompositedLayerMapping.cpp |
| index c94331dbb80fb1a8ac0984eaf5588afd697a6d29..10b6ec8172a0bab211213e6cd3052678e7c0678a 100644 |
| --- a/Source/core/rendering/CompositedLayerMapping.cpp |
| +++ b/Source/core/rendering/CompositedLayerMapping.cpp |
| @@ -1609,11 +1609,16 @@ bool CompositedLayerMapping::containsPaintedContent(bool isSimpleContainer) cons |
| if (isSimpleContainer || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection()) |
| return false; |
| + if (renderer()->isCanvas() || renderer()->isVideo() || renderer()->isImage()) { |
| + if (isAcceleratedCanvas(renderer())) { |
| + if (contentsBox() == toRenderBox(renderer())->borderBoxRect()) |
| + return true; |
| + } |
| + } |
| + |
|
vivekg
2014/02/18 12:30:39
How about reordering like here?
if (renderer()->
|
| if (isDirectlyCompositedImage()) |
| return false; |
| - // FIXME: we could optimize cases where the image, video or canvas is known to fill the border box entirely, |
| - // and set background color on the layer in that case, instead of allocating backing store and painting. |
| if (renderer()->isVideo() && toRenderVideo(renderer())->shouldDisplayVideo()) |
| return m_owningLayer->hasBoxDecorationsOrBackground(); |