| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" | 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" |
| 6 | 6 |
| 7 #include "cc/layers/content_layer_client.h" | 7 #include "cc/layers/content_layer_client.h" |
| 8 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
| 9 #include "cc/layers/picture_layer.h" | 9 #include "cc/layers/picture_layer.h" |
| 10 #include "cc/playback/compositing_display_item.h" | 10 #include "cc/playback/compositing_display_item.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 578 |
| 579 if (newChunk.properties.backfaceHidden != | 579 if (newChunk.properties.backfaceHidden != |
| 580 pendingLayerFirstChunk.properties.backfaceHidden) | 580 pendingLayerFirstChunk.properties.backfaceHidden) |
| 581 return false; | 581 return false; |
| 582 | 582 |
| 583 DCHECK_GE(candidatePendingLayer.paintChunks.size(), 1u); | 583 DCHECK_GE(candidatePendingLayer.paintChunks.size(), 1u); |
| 584 PropertyTreeStateIterator iterator(newChunk.properties.propertyTreeState); | 584 PropertyTreeStateIterator iterator(newChunk.properties.propertyTreeState); |
| 585 for (const PropertyTreeState* currentState = | 585 for (const PropertyTreeState* currentState = |
| 586 &newChunk.properties.propertyTreeState; | 586 &newChunk.properties.propertyTreeState; |
| 587 currentState; currentState = iterator.next()) { | 587 currentState; currentState = iterator.next()) { |
| 588 if (*currentState == candidatePendingLayer.propertyTreeState) | 588 if (currentState->equivalentGeometry( |
| 589 candidatePendingLayer.propertyTreeState)) |
| 589 return true; | 590 return true; |
| 590 if (currentState->hasDirectCompositingReasons()) | 591 if (currentState->hasDirectCompositingReasons()) |
| 591 return false; | 592 return false; |
| 592 } | 593 } |
| 593 return false; | 594 return false; |
| 594 } | 595 } |
| 595 | 596 |
| 596 bool PaintArtifactCompositor::mightOverlap( | 597 bool PaintArtifactCompositor::mightOverlap( |
| 597 const PaintChunk& paintChunk, | 598 const PaintChunk& paintChunk, |
| 598 const PendingLayer& candidatePendingLayer, | 599 const PendingLayer& candidatePendingLayer, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 #ifndef NDEBUG | 750 #ifndef NDEBUG |
| 750 void PaintArtifactCompositor::showDebugData() { | 751 void PaintArtifactCompositor::showDebugData() { |
| 751 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) | 752 LOG(ERROR) << layersAsJSON(LayerTreeIncludesDebugInfo) |
| 752 ->toPrettyJSONString() | 753 ->toPrettyJSONString() |
| 753 .utf8() | 754 .utf8() |
| 754 .data(); | 755 .data(); |
| 755 } | 756 } |
| 756 #endif | 757 #endif |
| 757 | 758 |
| 758 } // namespace blink | 759 } // namespace blink |
| OLD | NEW |