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

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

Issue 2795963002: cc: Reduce surface contents scale adjustments. (Closed)
Patch Set: apply scale for copy requests Created 3 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
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_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 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 PropertyTreeBuilder::BuildPropertyTrees( 480 PropertyTreeBuilder::BuildPropertyTrees(
481 inputs->root_layer, inputs->page_scale_layer, 481 inputs->root_layer, inputs->page_scale_layer,
482 inputs->inner_viewport_scroll_layer, 482 inputs->inner_viewport_scroll_layer,
483 inputs->outer_viewport_scroll_layer, 483 inputs->outer_viewport_scroll_layer,
484 inputs->elastic_overscroll_application_layer, 484 inputs->elastic_overscroll_application_layer,
485 inputs->elastic_overscroll, inputs->page_scale_factor, 485 inputs->elastic_overscroll, inputs->page_scale_factor,
486 inputs->device_scale_factor, gfx::Rect(inputs->device_viewport_size), 486 inputs->device_scale_factor, gfx::Rect(inputs->device_viewport_size),
487 inputs->device_transform, inputs->property_trees); 487 inputs->device_transform, inputs->property_trees);
488 draw_property_utils::UpdatePropertyTreesAndRenderSurfaces( 488 draw_property_utils::UpdatePropertyTreesAndRenderSurfaces(
489 inputs->root_layer, inputs->property_trees, 489 inputs->root_layer, inputs->property_trees,
490 inputs->can_render_to_separate_surface); 490 inputs->can_render_to_separate_surface,
491 inputs->can_adjust_raster_scales);
491 492
492 // Property trees are normally constructed on the main thread and 493 // Property trees are normally constructed on the main thread and
493 // passed to compositor thread. Source to parent updates on them are not 494 // passed to compositor thread. Source to parent updates on them are not
494 // allowed in the compositor thread. Some tests build them on the 495 // allowed in the compositor thread. Some tests build them on the
495 // compositor thread, so we need to explicitly disallow source to parent 496 // compositor thread, so we need to explicitly disallow source to parent
496 // updates when they are built on compositor thread. 497 // updates when they are built on compositor thread.
497 inputs->property_trees->transform_tree 498 inputs->property_trees->transform_tree
498 .set_source_to_parent_updates_allowed(false); 499 .set_source_to_parent_updates_allowed(false);
499 if (should_measure_property_tree_performance) { 500 if (should_measure_property_tree_performance) {
500 TRACE_EVENT_END0( 501 TRACE_EVENT_END0(
(...skipping 25 matching lines...) Expand all
526 gfx::RectF(gfx::SizeF(inputs->device_viewport_size))); 527 gfx::RectF(gfx::SizeF(inputs->device_viewport_size)));
527 float page_scale_factor_for_root = 528 float page_scale_factor_for_root =
528 inputs->page_scale_layer == inputs->root_layer 529 inputs->page_scale_layer == inputs->root_layer
529 ? inputs->page_scale_factor 530 ? inputs->page_scale_factor
530 : 1.f; 531 : 1.f;
531 property_trees->transform_tree.SetRootTransformsAndScales( 532 property_trees->transform_tree.SetRootTransformsAndScales(
532 inputs->device_scale_factor, page_scale_factor_for_root, 533 inputs->device_scale_factor, page_scale_factor_for_root,
533 inputs->device_transform, inputs->root_layer->position()); 534 inputs->device_transform, inputs->root_layer->position());
534 draw_property_utils::UpdatePropertyTreesAndRenderSurfaces( 535 draw_property_utils::UpdatePropertyTreesAndRenderSurfaces(
535 inputs->root_layer, inputs->property_trees, 536 inputs->root_layer, inputs->property_trees,
536 inputs->can_render_to_separate_surface); 537 inputs->can_render_to_separate_surface,
538 inputs->can_adjust_raster_scales);
537 break; 539 break;
538 } 540 }
539 } 541 }
540 542
541 if (should_measure_property_tree_performance) { 543 if (should_measure_property_tree_performance) {
542 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), 544 TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"),
543 "LayerTreeHostCommon::CalculateDrawProperties"); 545 "LayerTreeHostCommon::CalculateDrawProperties");
544 } 546 }
545 547
546 draw_property_utils::FindLayersThatNeedUpdates( 548 draw_property_utils::FindLayersThatNeedUpdates(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 645
644 PropertyTrees* GetPropertyTrees(Layer* layer) { 646 PropertyTrees* GetPropertyTrees(Layer* layer) {
645 return layer->layer_tree_host()->property_trees(); 647 return layer->layer_tree_host()->property_trees();
646 } 648 }
647 649
648 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 650 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
649 return layer->layer_tree_impl()->property_trees(); 651 return layer->layer_tree_impl()->property_trees();
650 } 652 }
651 653
652 } // namespace cc 654 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698