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 8352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8363 EXPECT_VECTOR_EQ(gfx::ScrollOffset(0, 100), | 8363 EXPECT_VECTOR_EQ(gfx::ScrollOffset(0, 100), |
8364 scrolling_layer->CurrentScrollOffset()); | 8364 scrolling_layer->CurrentScrollOffset()); |
8365 EXPECT_EQ(NULL, host_impl_->CurrentlyScrollingLayer()); | 8365 EXPECT_EQ(NULL, host_impl_->CurrentlyScrollingLayer()); |
8366 host_impl_->DidFinishImplFrame(); | 8366 host_impl_->DidFinishImplFrame(); |
8367 } | 8367 } |
8368 | 8368 |
8369 TEST_F(LayerTreeHostImplTest, InvalidLayerNotAddedToRasterQueue) { | 8369 TEST_F(LayerTreeHostImplTest, InvalidLayerNotAddedToRasterQueue) { |
8370 host_impl_->CreatePendingTree(); | 8370 host_impl_->CreatePendingTree(); |
8371 | 8371 |
8372 Region empty_invalidation; | 8372 Region empty_invalidation; |
8373 scoped_refptr<RasterSource> raster_source_with_tiles( | 8373 scoped_refptr<DisplayListRasterSource> raster_source_with_tiles( |
8374 FakeDisplayListRasterSource::CreateFilled(gfx::Size(10, 10))); | 8374 FakeDisplayListRasterSource::CreateFilled(gfx::Size(10, 10))); |
8375 | 8375 |
8376 scoped_ptr<FakePictureLayerImpl> layer = | 8376 scoped_ptr<FakePictureLayerImpl> layer = |
8377 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); | 8377 FakePictureLayerImpl::Create(host_impl_->pending_tree(), 11); |
8378 layer->SetBounds(gfx::Size(10, 10)); | 8378 layer->SetBounds(gfx::Size(10, 10)); |
8379 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); | 8379 layer->set_gpu_raster_max_texture_size(host_impl_->device_viewport_size()); |
8380 layer->SetDrawsContent(true); | 8380 layer->SetDrawsContent(true); |
8381 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); | 8381 layer->tilings()->AddTiling(1.0f, raster_source_with_tiles); |
8382 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, | 8382 layer->UpdateRasterSource(raster_source_with_tiles, &empty_invalidation, |
8383 nullptr); | 8383 nullptr); |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8836 host_impl_->ActivateSyncTree(); | 8836 host_impl_->ActivateSyncTree(); |
8837 host_impl_->active_tree()->UpdateDrawProperties(false); | 8837 host_impl_->active_tree()->UpdateDrawProperties(false); |
8838 active_tree_node = | 8838 active_tree_node = |
8839 host_impl_->active_tree()->property_trees()->transform_tree.Node( | 8839 host_impl_->active_tree()->property_trees()->transform_tree.Node( |
8840 page_scale_layer->transform_tree_index()); | 8840 page_scale_layer->transform_tree_index()); |
8841 EXPECT_EQ(active_tree_node->data.post_local_scale_factor, 2.f); | 8841 EXPECT_EQ(active_tree_node->data.post_local_scale_factor, 2.f); |
8842 } | 8842 } |
8843 | 8843 |
8844 } // namespace | 8844 } // namespace |
8845 } // namespace cc | 8845 } // namespace cc |
OLD | NEW |