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

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

Issue 1869983003: cc: Clean up helper function from layer tree host common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@targetid
Patch Set: rebase Created 4 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/layer_tree_host_common.h ('k') | no next file » | 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 // must compute all damage tracking before drawing anything, so that we know 617 // must compute all damage tracking before drawing anything, so that we know
618 // the root damage rect. The root damage rect is then used to scissor each 618 // the root damage rect. The root damage rect is then used to scissor each
619 // surface. 619 // surface.
620 size_t render_surface_layer_list_size = render_surface_layer_list.size(); 620 size_t render_surface_layer_list_size = render_surface_layer_list.size();
621 for (size_t i = 0; i < render_surface_layer_list_size; ++i) { 621 for (size_t i = 0; i < render_surface_layer_list_size; ++i) {
622 size_t surface_index = render_surface_layer_list_size - 1 - i; 622 size_t surface_index = render_surface_layer_list_size - 1 - i;
623 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index]; 623 LayerImpl* render_surface_layer = render_surface_layer_list[surface_index];
624 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); 624 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface();
625 DCHECK(render_surface); 625 DCHECK(render_surface);
626 render_surface->damage_tracker()->UpdateDamageTrackingState( 626 render_surface->damage_tracker()->UpdateDamageTrackingState(
627 render_surface->layer_list(), 627 render_surface->layer_list(), render_surface,
628 render_surface_layer->id(),
629 render_surface->SurfacePropertyChangedOnlyFromDescendant(), 628 render_surface->SurfacePropertyChangedOnlyFromDescendant(),
630 render_surface->content_rect(), 629 render_surface->content_rect(), render_surface_layer->mask_layer(),
631 render_surface_layer->mask_layer(),
632 render_surface_layer->filters()); 630 render_surface_layer->filters());
633 } 631 }
634 } 632 }
635 633
636 void LayerTreeHostImpl::FrameData::AsValueInto( 634 void LayerTreeHostImpl::FrameData::AsValueInto(
637 base::trace_event::TracedValue* value) const { 635 base::trace_event::TracedValue* value) const {
638 value->SetBoolean("has_no_damage", has_no_damage); 636 value->SetBoolean("has_no_damage", has_no_damage);
639 637
640 // Quad data can be quite large, so only dump render passes if we select 638 // Quad data can be quite large, so only dump render passes if we select
641 // cc.debug.quads. 639 // cc.debug.quads.
(...skipping 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after
3942 return task_runner_provider_->HasImplThread(); 3940 return task_runner_provider_->HasImplThread();
3943 } 3941 }
3944 3942
3945 bool LayerTreeHostImpl::CommitToActiveTree() const { 3943 bool LayerTreeHostImpl::CommitToActiveTree() const {
3946 // In single threaded mode we skip the pending tree and commit directly to the 3944 // In single threaded mode we skip the pending tree and commit directly to the
3947 // active tree. 3945 // active tree.
3948 return !task_runner_provider_->HasImplThread(); 3946 return !task_runner_provider_->HasImplThread();
3949 } 3947 }
3950 3948
3951 } // namespace cc 3949 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698