Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| index 256190d7c91ed484781411e952bd2d5e2d14e61b..a79484b7ce6ff3a559e48546a68662968c4b5edf 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp |
| @@ -304,7 +304,6 @@ IntRect GraphicsLayer::interestRect() |
| void GraphicsLayer::paint(GraphicsContext& context, const IntRect* interestRect) |
|
jbroman
2015/12/01 21:11:02
Is the plan to ultimately remove the argument from
|
| { |
| - ASSERT(interestRect || RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
| ASSERT(drawsContent()); |
| ASSERT(&context.paintController() == m_paintController); |
| @@ -315,11 +314,12 @@ void GraphicsLayer::paint(GraphicsContext& context, const IntRect* interestRect) |
| incrementPaintCount(); |
| IntRect newInterestRect; |
| + if (!interestRect) { |
| + newInterestRect = m_client->computeInterestRect(this, m_previousInterestRect); |
| + interestRect = &newInterestRect; |
| + } |
| + |
| if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) { |
| - if (!interestRect) { |
| - newInterestRect = m_client->computeInterestRect(this, m_previousInterestRect); |
| - interestRect = &newInterestRect; |
| - } |
| if (!m_client->needsRepaint() && !paintController()->cacheIsEmpty() && m_previousInterestRect == *interestRect) { |
| paintController()->createAndAppend<CachedDisplayItem>(*this, DisplayItem::CachedDisplayItemList); |
| return; |