| 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 8284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8295 EXPECT_VECTOR_EQ(gfx::ScrollOffset(0, 100), | 8295 EXPECT_VECTOR_EQ(gfx::ScrollOffset(0, 100), |
| 8296 scrolling_layer->CurrentScrollOffset()); | 8296 scrolling_layer->CurrentScrollOffset()); |
| 8297 EXPECT_EQ(NULL, host_impl_->CurrentlyScrollingLayer()); | 8297 EXPECT_EQ(NULL, host_impl_->CurrentlyScrollingLayer()); |
| 8298 host_impl_->DidFinishImplFrame(); | 8298 host_impl_->DidFinishImplFrame(); |
| 8299 } | 8299 } |
| 8300 | 8300 |
| 8301 TEST_F(LayerTreeHostImplTest, InvalidLayerNotAddedToRasterQueue) { | 8301 TEST_F(LayerTreeHostImplTest, InvalidLayerNotAddedToRasterQueue) { |
| 8302 host_impl_->CreatePendingTree(); | 8302 host_impl_->CreatePendingTree(); |
| 8303 | 8303 |
| 8304 Region empty_invalidation; | 8304 Region empty_invalidation; |
| 8305 scoped_refptr<RasterSource> raster_source_with_tiles( | 8305 scoped_refptr<DisplayListRasterSource> raster_source_with_tiles( |
| 8306 FakeDisplayListRasterSource::CreateFilled(gfx::Size(10, 10))); | 8306 FakeDisplayListRasterSource::CreateFilled(gfx::Size(10, 10))); |
| 8307 | 8307 |
| 8308 scoped_ptr<FakePictureLayerImpl> layer = | 8308 scoped_ptr<FakePictureLayerImpl> layer = |
| 8309 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); | 8309 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); |
| 8310 layer->SetBounds(gfx::Size(10, 10)); | 8310 layer->SetBounds(gfx::Size(10, 10)); |
| 8311 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); | 8311 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); |
| 8312 layer->SetDrawsContent(true); | 8312 layer->SetDrawsContent(true); |
| 8313 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); | 8313 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); |
| 8314 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, | 8314 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, |
| 8315 nullptr); | 8315 nullptr); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8768 host_impl_->ActivateSyncTree(); | 8768 host_impl_->ActivateSyncTree(); |
| 8769 host_impl_->active_tree()->UpdateDrawProperties(false); | 8769 host_impl_->active_tree()->UpdateDrawProperties(false); |
| 8770 active_tree_node = | 8770 active_tree_node = |
| 8771 host_impl_->active_tree()->property_trees()->transform_tree.Node( | 8771 host_impl_->active_tree()->property_trees()->transform_tree.Node( |
| 8772 page_scale_layer->transform_tree_index()); | 8772 page_scale_layer->transform_tree_index()); |
| 8773 EXPECT_EQ(active_tree_node->data.post_local_scale_factor, 2.f); | 8773 EXPECT_EQ(active_tree_node->data.post_local_scale_factor, 2.f); |
| 8774 } | 8774 } |
| 8775 | 8775 |
| 8776 } // namespace | 8776 } // namespace |
| 8777 } // namespace cc | 8777 } // namespace cc |
| OLD | NEW |