| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
| 8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/test/fake_compositor_frame_sink.h" | 10 #include "cc/test/fake_compositor_frame_sink.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 ->GetLayerTree() | 101 ->GetLayerTree() |
| 102 ->property_trees() | 102 ->property_trees() |
| 103 ->element_id_to_scroll_node_index[elementId]; | 103 ->element_id_to_scroll_node_index[elementId]; |
| 104 } | 104 } |
| 105 | 105 |
| 106 const cc::TransformNode& transformNode(const cc::Layer* layer) { | 106 const cc::TransformNode& transformNode(const cc::Layer* layer) { |
| 107 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); | 107 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void update(const PaintArtifact& artifact) { | 110 void update(const PaintArtifact& artifact) { |
| 111 m_paintArtifactCompositor->update(artifact, nullptr, false); | 111 GeometryMapper geometryMapper; |
| 112 m_paintArtifactCompositor->update(artifact, nullptr, false, geometryMapper); |
| 112 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); | 113 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); |
| 113 } | 114 } |
| 114 | 115 |
| 115 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } | 116 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } |
| 116 | 117 |
| 117 size_t contentLayerCount() { | 118 size_t contentLayerCount() { |
| 118 return m_paintArtifactCompositor->getExtraDataForTesting() | 119 return m_paintArtifactCompositor->getExtraDataForTesting() |
| 119 ->contentLayers.size(); | 120 ->contentLayers.size(); |
| 120 } | 121 } |
| 121 | 122 |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 chunk3.properties.propertyTreeState = chunk1.properties.propertyTreeState; | 1617 chunk3.properties.propertyTreeState = chunk1.properties.propertyTreeState; |
| 1617 chunk3.bounds = FloatRect(0, 0, 50, 60); | 1618 chunk3.bounds = FloatRect(0, 0, 50, 60); |
| 1618 chunk3.knownToBeOpaque = true; | 1619 chunk3.knownToBeOpaque = true; |
| 1619 pendingLayer.add(chunk3, nullptr); | 1620 pendingLayer.add(chunk3, nullptr); |
| 1620 | 1621 |
| 1621 // Chunk 3 covers the entire layer, so now it's opaque. | 1622 // Chunk 3 covers the entire layer, so now it's opaque. |
| 1622 EXPECT_TRUE(pendingLayer.knownToBeOpaque); | 1623 EXPECT_TRUE(pendingLayer.knownToBeOpaque); |
| 1623 } | 1624 } |
| 1624 | 1625 |
| 1625 } // namespace blink | 1626 } // namespace blink |
| OLD | NEW |