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

Side by Side Diff: cc/trees/layer_tree_host_common.cc

Issue 271533011: cc: Move tiling management out of draw properties calculation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PictureImageLayerImpl unittests updated. Created 6 years, 7 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
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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 layer, 1737 layer,
1738 globals.can_adjust_raster_scales, 1738 globals.can_adjust_raster_scales,
1739 ideal_contents_scale, 1739 ideal_contents_scale,
1740 globals.device_scale_factor, 1740 globals.device_scale_factor,
1741 data_from_ancestor.in_subtree_of_page_scale_application_layer 1741 data_from_ancestor.in_subtree_of_page_scale_application_layer
1742 ? globals.page_scale_factor 1742 ? globals.page_scale_factor
1743 : 1.f, 1743 : 1.f,
1744 combined_maximum_animation_contents_scale, 1744 combined_maximum_animation_contents_scale,
1745 animating_transform_to_screen); 1745 animating_transform_to_screen);
1746 1746
1747 layer_draw_properties.ideal_contents_scale = ideal_contents_scale;
1748 layer_draw_properties.maximum_animation_contents_scale =
1749 combined_maximum_animation_contents_scale;
1750 layer_draw_properties.page_scale =
1751 data_from_ancestor.in_subtree_of_page_scale_application_layer
1752 ? globals.page_scale_factor
1753 : 1.f;
1754 layer_draw_properties.device_scale = globals.device_scale_factor;
1755
1747 // The draw_transform that gets computed below is effectively the layer's 1756 // The draw_transform that gets computed below is effectively the layer's
1748 // draw_transform, unless the layer itself creates a render_surface. In that 1757 // draw_transform, unless the layer itself creates a render_surface. In that
1749 // case, the render_surface re-parents the transforms. 1758 // case, the render_surface re-parents the transforms.
1750 layer_draw_properties.target_space_transform = combined_transform; 1759 layer_draw_properties.target_space_transform = combined_transform;
1751 // M[draw] = M[parent] * LT * S[layer2content] 1760 // M[draw] = M[parent] * LT * S[layer2content]
1752 layer_draw_properties.target_space_transform.Scale( 1761 layer_draw_properties.target_space_transform.Scale(
1753 SK_MScalar1 / layer->contents_scale_x(), 1762 SK_MScalar1 / layer->contents_scale_x(),
1754 SK_MScalar1 / layer->contents_scale_y()); 1763 SK_MScalar1 / layer->contents_scale_y());
1755 1764
1756 // The layer's screen_space_transform represents the transform between root 1765 // The layer's screen_space_transform represents the transform between root
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 inputs->current_render_surface_layer_list_id); 2420 inputs->current_render_surface_layer_list_id);
2412 2421
2413 // The dummy layer list should not have been used. 2422 // The dummy layer list should not have been used.
2414 DCHECK_EQ(0u, dummy_layer_list.size()); 2423 DCHECK_EQ(0u, dummy_layer_list.size());
2415 // A root layer render_surface should always exist after 2424 // A root layer render_surface should always exist after
2416 // CalculateDrawProperties. 2425 // CalculateDrawProperties.
2417 DCHECK(inputs->root_layer->render_surface()); 2426 DCHECK(inputs->root_layer->render_surface());
2418 } 2427 }
2419 2428
2420 } // namespace cc 2429 } // namespace cc
OLDNEW
« cc/layers/picture_layer_impl.cc ('K') | « cc/layers/picture_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698