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

Side by Side Diff: cc/resources/tile_manager_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/resources/tile_manager_perftest.cc ('k') | cc/resources/tile_task_worker_pool_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/resources/eviction_tile_priority_queue.h" 5 #include "cc/resources/eviction_tile_priority_queue.h"
6 #include "cc/resources/raster_tile_priority_queue.h" 6 #include "cc/resources/raster_tile_priority_queue.h"
7 #include "cc/resources/tile.h" 7 #include "cc/resources/tile.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/begin_frame_args_test.h" 9 #include "cc/test/begin_frame_args_test.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 scoped_ptr<FakePictureLayerImpl> pending_layer; 109 scoped_ptr<FakePictureLayerImpl> pending_layer;
110 if (old_pending_root) { 110 if (old_pending_root) {
111 pending_layer.reset( 111 pending_layer.reset(
112 static_cast<FakePictureLayerImpl*>(old_pending_root.release())); 112 static_cast<FakePictureLayerImpl*>(old_pending_root.release()));
113 pending_layer->SetRasterSourceOnPending(pile, Region()); 113 pending_layer->SetRasterSourceOnPending(pile, Region());
114 } else { 114 } else {
115 pending_layer = 115 pending_layer =
116 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, pile); 116 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, pile);
117 pending_layer->SetDrawsContent(true); 117 pending_layer->SetDrawsContent(true);
118 pending_layer->SetHasRenderSurface(true);
118 } 119 }
119 // The bounds() just mirror the pile size. 120 // The bounds() just mirror the pile size.
120 pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); 121 pending_layer->SetBounds(pending_layer->raster_source()->GetSize());
121 pending_tree->SetRootLayer(pending_layer.Pass()); 122 pending_tree->SetRootLayer(pending_layer.Pass());
122 123
123 pending_layer_ = static_cast<FakePictureLayerImpl*>( 124 pending_layer_ = static_cast<FakePictureLayerImpl*>(
124 host_impl_.pending_tree()->LayerById(id_)); 125 host_impl_.pending_tree()->LayerById(id_));
125 126
126 // Add tilings/tiles for the layer. 127 // Add tilings/tiles for the layer.
127 host_impl_.pending_tree()->UpdateDrawProperties(); 128 host_impl_.pending_tree()->UpdateDrawProperties();
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 all_tiles.insert(queue.Top()); 873 all_tiles.insert(queue.Top());
873 ++tile_count; 874 ++tile_count;
874 queue.Pop(); 875 queue.Pop();
875 } 876 }
876 EXPECT_EQ(tile_count, all_tiles.size()); 877 EXPECT_EQ(tile_count, all_tiles.size());
877 EXPECT_EQ(16u, tile_count); 878 EXPECT_EQ(16u, tile_count);
878 } 879 }
879 880
880 } // namespace 881 } // namespace
881 } // namespace cc 882 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_perftest.cc ('k') | cc/resources/tile_task_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698