Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 2051013002: cc : Push layer lists instead of layer tree at commit and activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 FakeRasterSource::CreateFilled(layer_bounds); 2081 FakeRasterSource::CreateFilled(layer_bounds);
2082 2082
2083 host_impl()->CreatePendingTree(); 2083 host_impl()->CreatePendingTree();
2084 LayerTreeImpl* pending_tree = host_impl()->pending_tree(); 2084 LayerTreeImpl* pending_tree = host_impl()->pending_tree();
2085 2085
2086 std::unique_ptr<FakePictureLayerImpl> pending_layer = 2086 std::unique_ptr<FakePictureLayerImpl> pending_layer =
2087 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, layer_id(), 2087 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, layer_id(),
2088 pending_raster_source); 2088 pending_raster_source);
2089 pending_layer->SetDrawsContent(true); 2089 pending_layer->SetDrawsContent(true);
2090 pending_tree->SetRootLayer(std::move(pending_layer)); 2090 pending_tree->SetRootLayer(std::move(pending_layer));
2091 pending_tree->BuildLayerListForTesting();
2091 2092
2092 FakePictureLayerImpl* raw_pending_layer = static_cast<FakePictureLayerImpl*>( 2093 FakePictureLayerImpl* raw_pending_layer = static_cast<FakePictureLayerImpl*>(
2093 host_impl()->pending_tree()->LayerById(layer_id())); 2094 host_impl()->pending_tree()->LayerById(layer_id()));
2094 2095
2095 // Set some state on the pending layer, make sure it is not clobbered 2096 // Set some state on the pending layer, make sure it is not clobbered
2096 // by a sync from the active layer. This could happen because if the 2097 // by a sync from the active layer. This could happen because if the
2097 // pending layer has not been post-commit initialized it will attempt 2098 // pending layer has not been post-commit initialized it will attempt
2098 // to sync from the active layer. 2099 // to sync from the active layer.
2099 float raster_page_scale = 10.f * raw_pending_layer->raster_page_scale(); 2100 float raster_page_scale = 10.f * raw_pending_layer->raster_page_scale();
2100 raw_pending_layer->set_raster_page_scale(raster_page_scale); 2101 raw_pending_layer->set_raster_page_scale(raster_page_scale);
(...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after
4762 // New low res tiling. 4763 // New low res tiling.
4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); 4764 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles());
4764 4765
4765 // This tiling will be high res now, it won't contain low res content since it 4766 // This tiling will be high res now, it won't contain low res content since it
4766 // was all destroyed. 4767 // was all destroyed.
4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); 4768 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles());
4768 } 4769 }
4769 4770
4770 } // namespace 4771 } // namespace
4771 } // namespace cc 4772 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698