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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2756903002: Code cleanup: remove unnecessary conditional guard in PaintLayerCompositor (Closed)
Patch Set: Remove DCHECK Created 3 years, 9 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: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index 3aebdb015ba5d79b3be75e957783632aca2f0e8b..46b4647d4a22e7cddc85c698bab1e98931fface3 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -414,35 +414,34 @@ void PaintLayerCompositor::updateIfNeeded() {
}
}
- if (updateType != CompositingUpdateNone) {
- if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) {
- // If rootLayerScrolls is enabled, these properties are applied in
- // CompositedLayerMapping::updateElementIdAndCompositorMutableProperties.
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
- if (Element* scrollingElement =
- m_layoutView.document().scrollingElement()) {
- uint32_t mutableProperties = CompositorMutableProperty::kNone;
- if (scrollingElement->hasCompositorProxy())
- mutableProperties = (CompositorMutableProperty::kScrollLeft |
- CompositorMutableProperty::kScrollTop) &
- scrollingElement->compositorMutableProperties();
- m_scrollLayer->setCompositorMutableProperties(mutableProperties);
+ if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) {
+ // If rootLayerScrolls is enabled, these properties are applied in
+ // CompositedLayerMapping::updateElementIdAndCompositorMutableProperties.
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
+ if (Element* scrollingElement =
+ m_layoutView.document().scrollingElement()) {
+ uint32_t mutableProperties = CompositorMutableProperty::kNone;
+ if (scrollingElement->hasCompositorProxy()) {
+ mutableProperties = (CompositorMutableProperty::kScrollLeft |
+ CompositorMutableProperty::kScrollTop) &
+ scrollingElement->compositorMutableProperties();
}
+ m_scrollLayer->setCompositorMutableProperties(mutableProperties);
Stephen Chennney 2017/03/17 18:31:36 This doesn't require a scrollingElement like it di
smcgruer 2017/03/17 18:38:56 This is still inside that conditional. You are per
Stephen Chennney 2017/03/17 18:47:57 Sorry I missed that. Plus one for the style guide,
}
}
+ }
- GraphicsLayerUpdater updater;
- updater.update(*updateRoot, layersNeedingPaintInvalidation);
+ GraphicsLayerUpdater updater;
+ updater.update(*updateRoot, layersNeedingPaintInvalidation);
- if (updater.needsRebuildTree())
- updateType = std::max(updateType, CompositingUpdateRebuildTree);
+ if (updater.needsRebuildTree())
+ updateType = std::max(updateType, CompositingUpdateRebuildTree);
#if DCHECK_IS_ON()
- // FIXME: Move this check to the end of the compositing update.
- GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(
- *updateRoot);
+ // FIXME: Move this check to the end of the compositing update.
+ GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(
+ *updateRoot);
#endif
- }
if (updateType >= CompositingUpdateRebuildTree) {
GraphicsLayerVector childList;
« 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