OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/layers/tiled_layer.h" | 5 #include "cc/layers/tiled_layer.h" |
6 | 6 |
7 #include "cc/debug/overdraw_metrics.h" | 7 #include "cc/debug/overdraw_metrics.h" |
8 #include "cc/resources/bitmap_content_layer_updater.h" | 8 #include "cc/resources/bitmap_content_layer_updater.h" |
9 #include "cc/resources/layer_painter.h" | 9 #include "cc/resources/layer_painter.h" |
10 #include "cc/resources/prioritized_resource_manager.h" | 10 #include "cc/resources/prioritized_resource_manager.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 const scoped_refptr<FakeTiledLayer>& layer2) | 120 const scoped_refptr<FakeTiledLayer>& layer2) |
121 { | 121 { |
122 if (layer1 && !layer1->parent()) | 122 if (layer1 && !layer1->parent()) |
123 layer_tree_host_->root_layer()->AddChild(layer1); | 123 layer_tree_host_->root_layer()->AddChild(layer1); |
124 if (layer2 && !layer2->parent()) | 124 if (layer2 && !layer2->parent()) |
125 layer_tree_host_->root_layer()->AddChild(layer2); | 125 layer_tree_host_->root_layer()->AddChild(layer2); |
126 if (m_occlusion) | 126 if (m_occlusion) |
127 m_occlusion->setRenderTarget(layer_tree_host_->root_layer()); | 127 m_occlusion->setRenderTarget(layer_tree_host_->root_layer()); |
128 | 128 |
129 std::vector<scoped_refptr<Layer> > renderSurfaceLayerList; | 129 std::vector<scoped_refptr<Layer> > renderSurfaceLayerList; |
130 LayerTreeHostCommon::calculateDrawProperties( | 130 LayerTreeHostCommon::CalculateDrawProperties( |
131 layer_tree_host_->root_layer(), | 131 layer_tree_host_->root_layer(), |
132 layer_tree_host_->device_viewport_size(), | 132 layer_tree_host_->device_viewport_size(), |
133 layer_tree_host_->device_scale_factor(), | 133 layer_tree_host_->device_scale_factor(), |
134 1, // page_scale_factor | 134 1, // page_scale_factor |
135 layer_tree_host_->GetRendererCapabilities().max_texture_size, | 135 layer_tree_host_->GetRendererCapabilities().max_texture_size, |
136 false, // can_use_lcd_text | 136 false, // can_use_lcd_text |
137 renderSurfaceLayerList); | 137 &renderSurfaceLayerList); |
138 } | 138 } |
139 | 139 |
140 bool updateAndPush(const scoped_refptr<FakeTiledLayer>& layer1, | 140 bool updateAndPush(const scoped_refptr<FakeTiledLayer>& layer1, |
141 const scoped_ptr<FakeTiledLayerImpl>& layerImpl1) | 141 const scoped_ptr<FakeTiledLayerImpl>& layerImpl1) |
142 { | 142 { |
143 scoped_refptr<FakeTiledLayer> layer2; | 143 scoped_refptr<FakeTiledLayer> layer2; |
144 scoped_ptr<FakeTiledLayerImpl> layerImpl2; | 144 scoped_ptr<FakeTiledLayerImpl> layerImpl2; |
145 return updateAndPush(layer1, layerImpl1, layer2, layerImpl2); | 145 return updateAndPush(layer1, layerImpl1, layer2, layerImpl2); |
146 } | 146 } |
147 | 147 |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 | 1662 |
1663 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. | 1663 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. |
1664 layer->SetNeedsDisplayRect(layerRect); | 1664 layer->SetNeedsDisplayRect(layerRect); |
1665 layer->Update(m_queue.get(), 0, NULL); | 1665 layer->Update(m_queue.get(), 0, NULL); |
1666 | 1666 |
1667 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); | 1667 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); |
1668 } | 1668 } |
1669 | 1669 |
1670 } // namespace | 1670 } // namespace |
1671 } // namespace cc | 1671 } // namespace cc |
OLD | NEW |