| 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/tiled_layer.h" | 5 #include "cc/tiled_layer.h" |
| 6 | 6 |
| 7 #include "cc/bitmap_content_layer_updater.h" | 7 #include "cc/bitmap_content_layer_updater.h" |
| 8 #include "cc/layer_painter.h" | 8 #include "cc/layer_painter.h" |
| 9 #include "cc/overdraw_metrics.h" | 9 #include "cc/overdraw_metrics.h" |
| 10 #include "cc/prioritized_resource_manager.h" | 10 #include "cc/prioritized_resource_manager.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 void updateTextures() | 87 void updateTextures() |
| 88 { | 88 { |
| 89 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked(m_proxy); | 89 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked(m_proxy); |
| 90 DCHECK(m_queue); | 90 DCHECK(m_queue); |
| 91 scoped_ptr<ResourceUpdateController> updateController = | 91 scoped_ptr<ResourceUpdateController> updateController = |
| 92 ResourceUpdateController::create( | 92 ResourceUpdateController::create( |
| 93 NULL, | 93 NULL, |
| 94 m_proxy->implThread(), | 94 m_proxy->implThread(), |
| 95 m_queue.Pass(), | 95 m_queue.Pass(), |
| 96 m_resourceProvider.get(), | 96 m_resourceProvider.get()); |
| 97 m_proxy->hasImplThread()); | |
| 98 updateController->finalize(); | 97 updateController->finalize(); |
| 99 m_queue = make_scoped_ptr(new ResourceUpdateQueue); | 98 m_queue = make_scoped_ptr(new ResourceUpdateQueue); |
| 100 } | 99 } |
| 101 void layerPushPropertiesTo(FakeTiledLayer* layer, FakeTiledLayerImpl* layerI
mpl) | 100 void layerPushPropertiesTo(FakeTiledLayer* layer, FakeTiledLayerImpl* layerI
mpl) |
| 102 { | 101 { |
| 103 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked(m_proxy); | 102 DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBloc
ked(m_proxy); |
| 104 layer->pushPropertiesTo(layerImpl); | 103 layer->pushPropertiesTo(layerImpl); |
| 105 } | 104 } |
| 106 void layerUpdate(FakeTiledLayer* layer, TestOcclusionTracker* occluded) | 105 void layerUpdate(FakeTiledLayer* layer, TestOcclusionTracker* occluded) |
| 107 { | 106 { |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 | 1667 |
| 1669 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. | 1668 // Invalidate the entire layer in layer space. When painting, the rect given
to webkit should match the layer's bounds. |
| 1670 layer->setNeedsDisplayRect(layerRect); | 1669 layer->setNeedsDisplayRect(layerRect); |
| 1671 layer->update(*m_queue.get(), 0, NULL); | 1670 layer->update(*m_queue.get(), 0, NULL); |
| 1672 | 1671 |
| 1673 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); | 1672 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); |
| 1674 } | 1673 } |
| 1675 | 1674 |
| 1676 } // namespace | 1675 } // namespace |
| 1677 } // namespace cc | 1676 } // namespace cc |
| OLD | NEW |