Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 407 } | 407 } |
| 408 | 408 |
| 409 if (layersChanged) { | 409 if (layersChanged) { |
| 410 updateType = std::max(updateType, CompositingUpdateRebuildTree); | 410 updateType = std::max(updateType, CompositingUpdateRebuildTree); |
| 411 if (ScrollingCoordinator* scrollingCoordinator = | 411 if (ScrollingCoordinator* scrollingCoordinator = |
| 412 this->scrollingCoordinator()) | 412 this->scrollingCoordinator()) |
| 413 scrollingCoordinator->notifyGeometryChanged(); | 413 scrollingCoordinator->notifyGeometryChanged(); |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 | 416 |
| 417 if (updateType != CompositingUpdateNone) { | 417 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) { |
| 418 if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) { | 418 // If rootLayerScrolls is enabled, these properties are applied in |
| 419 // If rootLayerScrolls is enabled, these properties are applied in | 419 // CompositedLayerMapping::updateElementIdAndCompositorMutableProperties. |
| 420 // CompositedLayerMapping::updateElementIdAndCompositorMutableProperties. | 420 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { |
| 421 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { | 421 if (Element* scrollingElement = |
| 422 if (Element* scrollingElement = | 422 m_layoutView.document().scrollingElement()) { |
| 423 m_layoutView.document().scrollingElement()) { | 423 uint32_t mutableProperties = CompositorMutableProperty::kNone; |
| 424 uint32_t mutableProperties = CompositorMutableProperty::kNone; | 424 if (scrollingElement->hasCompositorProxy()) { |
| 425 if (scrollingElement->hasCompositorProxy()) | 425 mutableProperties = (CompositorMutableProperty::kScrollLeft | |
| 426 mutableProperties = (CompositorMutableProperty::kScrollLeft | | 426 CompositorMutableProperty::kScrollTop) & |
| 427 CompositorMutableProperty::kScrollTop) & | 427 scrollingElement->compositorMutableProperties(); |
| 428 scrollingElement->compositorMutableProperties(); | |
| 429 m_scrollLayer->setCompositorMutableProperties(mutableProperties); | |
| 430 } | 428 } |
| 429 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,
| |
| 431 } | 430 } |
| 432 } | 431 } |
| 432 } | |
| 433 | 433 |
| 434 GraphicsLayerUpdater updater; | 434 GraphicsLayerUpdater updater; |
| 435 updater.update(*updateRoot, layersNeedingPaintInvalidation); | 435 updater.update(*updateRoot, layersNeedingPaintInvalidation); |
| 436 | 436 |
| 437 if (updater.needsRebuildTree()) | 437 if (updater.needsRebuildTree()) |
| 438 updateType = std::max(updateType, CompositingUpdateRebuildTree); | 438 updateType = std::max(updateType, CompositingUpdateRebuildTree); |
| 439 | 439 |
| 440 #if DCHECK_IS_ON() | 440 #if DCHECK_IS_ON() |
| 441 // FIXME: Move this check to the end of the compositing update. | 441 // FIXME: Move this check to the end of the compositing update. |
| 442 GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared( | 442 GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared( |
| 443 *updateRoot); | 443 *updateRoot); |
| 444 #endif | 444 #endif |
| 445 } | |
| 446 | 445 |
| 447 if (updateType >= CompositingUpdateRebuildTree) { | 446 if (updateType >= CompositingUpdateRebuildTree) { |
| 448 GraphicsLayerVector childList; | 447 GraphicsLayerVector childList; |
| 449 { | 448 { |
| 450 TRACE_EVENT0("blink", "GraphicsLayerTreeBuilder::rebuild"); | 449 TRACE_EVENT0("blink", "GraphicsLayerTreeBuilder::rebuild"); |
| 451 GraphicsLayerTreeBuilder().rebuild(*updateRoot, childList); | 450 GraphicsLayerTreeBuilder().rebuild(*updateRoot, childList); |
| 452 } | 451 } |
| 453 | 452 |
| 454 if (!childList.isEmpty()) { | 453 if (!childList.isEmpty()) { |
| 455 CHECK(m_compositing); | 454 CHECK(m_compositing); |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1316 } else if (graphicsLayer == m_scrollLayer.get()) { | 1315 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 1317 name = "Frame Scrolling Layer"; | 1316 name = "Frame Scrolling Layer"; |
| 1318 } else { | 1317 } else { |
| 1319 ASSERT_NOT_REACHED(); | 1318 ASSERT_NOT_REACHED(); |
| 1320 } | 1319 } |
| 1321 | 1320 |
| 1322 return name; | 1321 return name; |
| 1323 } | 1322 } |
| 1324 | 1323 |
| 1325 } // namespace blink | 1324 } // namespace blink |
| OLD | NEW |