OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 | 1024 |
1025 std::unique_ptr<FakePictureLayerImpl> pending_child = | 1025 std::unique_ptr<FakePictureLayerImpl> pending_child = |
1026 FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, | 1026 FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, |
1027 pending_raster_source); | 1027 pending_raster_source); |
1028 FakePictureLayerImpl* pending_child_layer = pending_child.get(); | 1028 FakePictureLayerImpl* pending_child_layer = pending_child.get(); |
1029 pending_layer_->AddChild(std::move(pending_child)); | 1029 pending_layer_->AddChild(std::move(pending_child)); |
1030 | 1030 |
1031 // Create a fully transparent child layer so that its tile priorities are not | 1031 // Create a fully transparent child layer so that its tile priorities are not |
1032 // considered to be valid. | 1032 // considered to be valid. |
1033 pending_child_layer->SetDrawsContent(true); | 1033 pending_child_layer->SetDrawsContent(true); |
1034 pending_child_layer->SetForceRenderSurface(true); | 1034 pending_child_layer->test_properties()->force_render_surface = true; |
1035 | 1035 |
1036 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 1036 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
1037 bool update_lcd_text = false; | 1037 bool update_lcd_text = false; |
1038 host_impl_.pending_tree()->property_trees()->needs_rebuild = true; | 1038 host_impl_.pending_tree()->property_trees()->needs_rebuild = true; |
1039 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); | 1039 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); |
1040 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); | 1040 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); |
1041 | 1041 |
1042 pending_child_layer->OnOpacityAnimated(0.0); | 1042 pending_child_layer->OnOpacityAnimated(0.0); |
1043 | 1043 |
1044 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 1044 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 | 2119 |
2120 // Ensures that the tile manager does not attempt to reuse tiles when partial | 2120 // Ensures that the tile manager does not attempt to reuse tiles when partial |
2121 // raster is disabled. | 2121 // raster is disabled. |
2122 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { | 2122 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { |
2123 RunPartialRasterCheck(std::move(host_impl_), | 2123 RunPartialRasterCheck(std::move(host_impl_), |
2124 false /* partial_raster_enabled */); | 2124 false /* partial_raster_enabled */); |
2125 } | 2125 } |
2126 | 2126 |
2127 } // namespace | 2127 } // namespace |
2128 } // namespace cc | 2128 } // namespace cc |
OLD | NEW |