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

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

Issue 2693703010: cc: Remove support for disabling non-root render surfaces. (Closed)
Patch Set: softwaredraw-remove-no-surfaces: rebase Created 3 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
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common.h » ('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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 LayerList update_layer_list; 675 LayerList update_layer_list;
676 676
677 { 677 {
678 base::AutoReset<bool> update_property_trees(&in_update_property_trees_, 678 base::AutoReset<bool> update_property_trees(&in_update_property_trees_,
679 true); 679 true);
680 TRACE_EVENT0("cc", 680 TRACE_EVENT0("cc",
681 "LayerTreeHostInProcess::UpdateLayers::BuildPropertyTrees"); 681 "LayerTreeHostInProcess::UpdateLayers::BuildPropertyTrees");
682 TRACE_EVENT0( 682 TRACE_EVENT0(
683 TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"), 683 TRACE_DISABLED_BY_DEFAULT("cc.debug.cdp-perf"),
684 "LayerTreeHostInProcessCommon::ComputeVisibleRectsWithPropertyTrees"); 684 "LayerTreeHostInProcessCommon::ComputeVisibleRectsWithPropertyTrees");
685 bool can_render_to_separate_surface = true;
686 PropertyTrees* property_trees = &property_trees_; 685 PropertyTrees* property_trees = &property_trees_;
687 if (!settings_.use_layer_lists) { 686 if (!settings_.use_layer_lists) {
688 // If use_layer_lists is set, then the property trees should have been 687 // If use_layer_lists is set, then the property trees should have been
689 // built by the client already. 688 // built by the client already.
690 PropertyTreeBuilder::BuildPropertyTrees( 689 PropertyTreeBuilder::BuildPropertyTrees(
691 root_layer, page_scale_layer, inner_viewport_scroll_layer(), 690 root_layer, page_scale_layer, inner_viewport_scroll_layer(),
692 outer_viewport_scroll_layer(), overscroll_elasticity_layer(), 691 outer_viewport_scroll_layer(), overscroll_elasticity_layer(),
693 elastic_overscroll_, page_scale_factor_, device_scale_factor_, 692 elastic_overscroll_, page_scale_factor_, device_scale_factor_,
694 gfx::Rect(device_viewport_size_), identity_transform, property_trees); 693 gfx::Rect(device_viewport_size_), identity_transform, property_trees);
695 TRACE_EVENT_INSTANT1( 694 TRACE_EVENT_INSTANT1(
696 "cc", "LayerTreeHostInProcess::UpdateLayers_BuiltPropertyTrees", 695 "cc", "LayerTreeHostInProcess::UpdateLayers_BuiltPropertyTrees",
697 TRACE_EVENT_SCOPE_THREAD, "property_trees", 696 TRACE_EVENT_SCOPE_THREAD, "property_trees",
698 property_trees->AsTracedValue()); 697 property_trees->AsTracedValue());
699 } else { 698 } else {
700 TRACE_EVENT_INSTANT1( 699 TRACE_EVENT_INSTANT1(
701 "cc", "LayerTreeHostInProcess::UpdateLayers_ReceivedPropertyTrees", 700 "cc", "LayerTreeHostInProcess::UpdateLayers_ReceivedPropertyTrees",
702 TRACE_EVENT_SCOPE_THREAD, "property_trees", 701 TRACE_EVENT_SCOPE_THREAD, "property_trees",
703 property_trees->AsTracedValue()); 702 property_trees->AsTracedValue());
704 } 703 }
705 draw_property_utils::UpdatePropertyTrees(this, property_trees, 704 draw_property_utils::UpdatePropertyTrees(this, property_trees);
706 can_render_to_separate_surface);
707 draw_property_utils::FindLayersThatNeedUpdates(this, property_trees, 705 draw_property_utils::FindLayersThatNeedUpdates(this, property_trees,
708 &update_layer_list); 706 &update_layer_list);
709 } 707 }
710 708
711 for (const auto& layer : update_layer_list) 709 for (const auto& layer : update_layer_list)
712 layer->SavePaintProperties(); 710 layer->SavePaintProperties();
713 711
714 bool content_is_suitable_for_gpu = true; 712 bool content_is_suitable_for_gpu = true;
715 bool did_paint_content = 713 bool did_paint_content =
716 PaintContent(update_layer_list, &content_is_suitable_for_gpu); 714 PaintContent(update_layer_list, &content_is_suitable_for_gpu);
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 void LayerTreeHost::SetNeedsDisplayOnAllLayers() { 1437 void LayerTreeHost::SetNeedsDisplayOnAllLayers() {
1440 for (auto* layer : *this) 1438 for (auto* layer : *this)
1441 layer->SetNeedsDisplay(); 1439 layer->SetNeedsDisplay();
1442 } 1440 }
1443 1441
1444 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) { 1442 void LayerTreeHost::SetHasCopyRequest(bool has_copy_request) {
1445 has_copy_request_ = has_copy_request; 1443 has_copy_request_ = has_copy_request;
1446 } 1444 }
1447 1445
1448 } // namespace cc 1446 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698