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

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

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed line length Created 4 years 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_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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); 749 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface();
750 bool root_surface_has_no_visible_damage = 750 bool root_surface_has_no_visible_damage =
751 !root_surface->damage_tracker()->current_damage_rect().Intersects( 751 !root_surface->damage_tracker()->current_damage_rect().Intersects(
752 root_surface->content_rect()); 752 root_surface->content_rect());
753 bool root_surface_has_contributing_layers = 753 bool root_surface_has_contributing_layers =
754 !root_surface->layer_list().empty(); 754 !root_surface->layer_list().empty();
755 bool hud_wants_to_draw_ = active_tree_->hud_layer() && 755 bool hud_wants_to_draw_ = active_tree_->hud_layer() &&
756 active_tree_->hud_layer()->IsAnimatingHUDContents(); 756 active_tree_->hud_layer()->IsAnimatingHUDContents();
757 bool resources_must_be_resent = 757 bool resources_must_be_resent =
758 compositor_frame_sink_->capabilities().can_force_reclaim_resources; 758 compositor_frame_sink_->capabilities().can_force_reclaim_resources;
759 // When touch handle visibility changes there is no visible damage
760 // because touch handles are composited in the browser. However we
761 // still want the browser to be notified that the handles changed
762 // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep
763 // track of handle visibility changes through |handle_visibility_changed|.
764 bool handle_visibility_changed =
765 active_tree_->GetAndResetHandleVisibilityChanged();
759 if (root_surface_has_contributing_layers && 766 if (root_surface_has_contributing_layers &&
760 root_surface_has_no_visible_damage && 767 root_surface_has_no_visible_damage &&
761 !active_tree_->property_trees()->effect_tree.HasCopyRequests() && 768 !active_tree_->property_trees()->effect_tree.HasCopyRequests() &&
762 !resources_must_be_resent && !hud_wants_to_draw_) { 769 !resources_must_be_resent && !hud_wants_to_draw_ &&
770 !handle_visibility_changed) {
763 TRACE_EVENT0("cc", 771 TRACE_EVENT0("cc",
764 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); 772 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
765 frame->has_no_damage = true; 773 frame->has_no_damage = true;
766 DCHECK(!resourceless_software_draw_); 774 DCHECK(!resourceless_software_draw_);
767 return DRAW_SUCCESS; 775 return DRAW_SUCCESS;
768 } 776 }
769 777
770 TRACE_EVENT_BEGIN2( 778 TRACE_EVENT_BEGIN2(
771 "cc", "LayerTreeHostImpl::CalculateRenderPasses", 779 "cc", "LayerTreeHostImpl::CalculateRenderPasses",
772 "render_surface_layer_list.size()", 780 "render_surface_layer_list.size()",
(...skipping 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4057 worker_context_visibility_ = 4065 worker_context_visibility_ =
4058 worker_context->CacheController()->ClientBecameVisible(); 4066 worker_context->CacheController()->ClientBecameVisible();
4059 } else { 4067 } else {
4060 worker_context->CacheController()->ClientBecameNotVisible( 4068 worker_context->CacheController()->ClientBecameNotVisible(
4061 std::move(worker_context_visibility_)); 4069 std::move(worker_context_visibility_));
4062 } 4070 }
4063 } 4071 }
4064 } 4072 }
4065 4073
4066 } // namespace cc 4074 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.h » ('j') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698