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

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

Issue 13285002: cc: Consolidate LayerList types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/test/layer_tree_test.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 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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/debug/overdraw_metrics.h" 10 #include "cc/debug/overdraw_metrics.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void CalcDrawProps(const scoped_refptr<FakeTiledLayer>& layer1, 124 void CalcDrawProps(const scoped_refptr<FakeTiledLayer>& layer1,
125 const scoped_refptr<FakeTiledLayer>& layer2) { 125 const scoped_refptr<FakeTiledLayer>& layer2) {
126 if (layer1 && !layer1->parent()) 126 if (layer1 && !layer1->parent())
127 layer_tree_host_->root_layer()->AddChild(layer1); 127 layer_tree_host_->root_layer()->AddChild(layer1);
128 if (layer2 && !layer2->parent()) 128 if (layer2 && !layer2->parent())
129 layer_tree_host_->root_layer()->AddChild(layer2); 129 layer_tree_host_->root_layer()->AddChild(layer2);
130 if (occlusion_) 130 if (occlusion_)
131 occlusion_->SetRenderTarget(layer_tree_host_->root_layer()); 131 occlusion_->SetRenderTarget(layer_tree_host_->root_layer());
132 132
133 std::vector<scoped_refptr<Layer> > render_surface_layer_list; 133 LayerList render_surface_layer_list;
134 LayerTreeHostCommon::CalculateDrawProperties( 134 LayerTreeHostCommon::CalculateDrawProperties(
135 layer_tree_host_->root_layer(), 135 layer_tree_host_->root_layer(),
136 layer_tree_host_->device_viewport_size(), 136 layer_tree_host_->device_viewport_size(),
137 layer_tree_host_->device_scale_factor(), 137 layer_tree_host_->device_scale_factor(),
138 1.f, // page_scale_factor 138 1.f, // page_scale_factor
139 layer_tree_host_->GetRendererCapabilities().max_texture_size, 139 layer_tree_host_->GetRendererCapabilities().max_texture_size,
140 false, // can_use_lcd_text 140 false, // can_use_lcd_text
141 &render_surface_layer_list); 141 &render_surface_layer_list);
142 } 142 }
143 143
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 // Invalidate the entire layer in layer space. When painting, the rect given 1798 // Invalidate the entire layer in layer space. When painting, the rect given
1799 // to webkit should match the layer's bounds. 1799 // to webkit should match the layer's bounds.
1800 layer->SetNeedsDisplayRect(layer_rect); 1800 layer->SetNeedsDisplayRect(layer_rect);
1801 layer->Update(queue_.get(), 0, NULL); 1801 layer->Update(queue_.get(), 0, NULL);
1802 1802
1803 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); 1803 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
1804 } 1804 }
1805 1805
1806 } // namespace 1806 } // namespace
1807 } // namespace cc 1807 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698