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

Unified Diff: sky/engine/core/rendering/RenderImage.cpp

Issue 854573003: Inline paintInvalidationOrMarkForLayout. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/rendering/RenderImage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderImage.cpp
diff --git a/sky/engine/core/rendering/RenderImage.cpp b/sky/engine/core/rendering/RenderImage.cpp
index 8e757119190367c1b3e05a3a85d5999ef4b401ba..f04aabd61fbff7148555f8b8d7036b8ad4eb6bec 100644
--- a/sky/engine/core/rendering/RenderImage.cpp
+++ b/sky/engine/core/rendering/RenderImage.cpp
@@ -113,27 +113,6 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
if (hasBoxDecorationBackground() || hasMask())
RenderReplaced::imageChanged(newImage, rect);
- paintInvalidationOrMarkForLayout(rect);
-}
-
-void RenderImage::updateIntrinsicSizeIfNeeded(const LayoutSize& newSize)
-{
- if (m_imageResource->errorOccurred() || !m_imageResource->hasImage())
- return;
- setIntrinsicSize(newSize);
-}
-
-void RenderImage::updateInnerContentRect()
-{
- // Propagate container size to the image resource.
- LayoutRect containerRect = replacedContentRect();
- IntSize containerSize(containerRect.width(), containerRect.height());
- if (!containerSize.isEmpty())
- m_imageResource->setContainerSizeForRenderer(containerSize);
-}
-
-void RenderImage::paintInvalidationOrMarkForLayout(const IntRect* rect)
-{
ASSERT(isRooted());
LayoutSize oldIntrinsicSize = intrinsicSize();
@@ -167,6 +146,22 @@ void RenderImage::paintInvalidationOrMarkForLayout(const IntRect* rect)
}
}
+void RenderImage::updateIntrinsicSizeIfNeeded(const LayoutSize& newSize)
+{
+ if (m_imageResource->errorOccurred() || !m_imageResource->hasImage())
+ return;
+ setIntrinsicSize(newSize);
+}
+
+void RenderImage::updateInnerContentRect()
+{
+ // Propagate container size to the image resource.
+ LayoutRect containerRect = replacedContentRect();
+ IntSize containerSize(containerRect.width(), containerRect.height());
+ if (!containerSize.isEmpty())
+ m_imageResource->setContainerSizeForRenderer(containerSize);
+}
+
void RenderImage::notifyFinished(Resource* newImage)
{
if (!m_imageResource)
« no previous file with comments | « sky/engine/core/rendering/RenderImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698