Chromium Code Reviews| 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/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "cc/playback/raster_source.h" | 10 #include "cc/playback/raster_source.h" |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1020 | 1020 |
| 1021 scoped_ptr<FakePictureLayerImpl> pending_child = | 1021 scoped_ptr<FakePictureLayerImpl> pending_child = |
| 1022 FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, | 1022 FakePictureLayerImpl::CreateWithRasterSource(host_impl_.pending_tree(), 2, |
| 1023 pending_raster_source); | 1023 pending_raster_source); |
| 1024 FakePictureLayerImpl* pending_child_layer = pending_child.get(); | 1024 FakePictureLayerImpl* pending_child_layer = pending_child.get(); |
| 1025 pending_layer_->AddChild(std::move(pending_child)); | 1025 pending_layer_->AddChild(std::move(pending_child)); |
| 1026 | 1026 |
| 1027 // Create a fully transparent child layer so that its tile priorities are not | 1027 // Create a fully transparent child layer so that its tile priorities are not |
| 1028 // considered to be valid. | 1028 // considered to be valid. |
| 1029 pending_child_layer->SetDrawsContent(true); | 1029 pending_child_layer->SetDrawsContent(true); |
| 1030 pending_child_layer->SetForceRenderSurface(true); | |
|
ajuma
2016/04/05 15:16:46
Why do we need to force a render surface here? Is
jaydasika
2016/04/05 17:24:22
Yes.
| |
| 1030 | 1031 |
| 1031 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 1032 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
| 1032 bool update_lcd_text = false; | 1033 bool update_lcd_text = false; |
| 1033 host_impl_.pending_tree()->property_trees()->needs_rebuild = true; | 1034 host_impl_.pending_tree()->property_trees()->needs_rebuild = true; |
| 1034 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); | 1035 host_impl_.pending_tree()->BuildPropertyTreesForTesting(); |
| 1035 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); | 1036 host_impl_.pending_tree()->UpdateDrawProperties(update_lcd_text); |
| 1036 | 1037 |
| 1037 pending_child_layer->OnOpacityAnimated(0.0); | 1038 pending_child_layer->OnOpacityAnimated(0.0); |
| 1038 | 1039 |
| 1039 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 1040 host_impl_.AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2021 | 2022 |
| 2022 // Ensures that the tile manager does not attempt to reuse tiles when partial | 2023 // Ensures that the tile manager does not attempt to reuse tiles when partial |
| 2023 // raster is disabled. | 2024 // raster is disabled. |
| 2024 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { | 2025 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { |
| 2025 RunPartialRasterCheck(std::move(host_impl_), | 2026 RunPartialRasterCheck(std::move(host_impl_), |
| 2026 false /* partial_raster_enabled */); | 2027 false /* partial_raster_enabled */); |
| 2027 } | 2028 } |
| 2028 | 2029 |
| 2029 } // namespace | 2030 } // namespace |
| 2030 } // namespace cc | 2031 } // namespace cc |
| OLD | NEW |