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

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: format Created 3 years, 11 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_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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); 768 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface();
769 bool root_surface_has_no_visible_damage = 769 bool root_surface_has_no_visible_damage =
770 !root_surface->damage_tracker()->current_damage_rect().Intersects( 770 !root_surface->damage_tracker()->current_damage_rect().Intersects(
771 root_surface->content_rect()); 771 root_surface->content_rect());
772 bool root_surface_has_contributing_layers = 772 bool root_surface_has_contributing_layers =
773 !root_surface->layer_list().empty(); 773 !root_surface->layer_list().empty();
774 bool hud_wants_to_draw_ = active_tree_->hud_layer() && 774 bool hud_wants_to_draw_ = active_tree_->hud_layer() &&
775 active_tree_->hud_layer()->IsAnimatingHUDContents(); 775 active_tree_->hud_layer()->IsAnimatingHUDContents();
776 bool must_always_swap = 776 bool must_always_swap =
777 compositor_frame_sink_->capabilities().must_always_swap; 777 compositor_frame_sink_->capabilities().must_always_swap;
778 // When touch handle visibility changes there is no visible damage
779 // because touch handles are composited in the browser. However we
780 // still want the browser to be notified that the handles changed
781 // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep
782 // track of handle visibility changes through |handle_visibility_changed|.
783 bool handle_visibility_changed =
784 active_tree_->GetAndResetHandleVisibilityChanged();
778 if (root_surface_has_contributing_layers && 785 if (root_surface_has_contributing_layers &&
779 root_surface_has_no_visible_damage && 786 root_surface_has_no_visible_damage &&
780 !active_tree_->property_trees()->effect_tree.HasCopyRequests() && 787 !active_tree_->property_trees()->effect_tree.HasCopyRequests() &&
781 !must_always_swap && !hud_wants_to_draw_) { 788 !must_always_swap && !hud_wants_to_draw_ && !handle_visibility_changed) {
782 TRACE_EVENT0("cc", 789 TRACE_EVENT0("cc",
783 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); 790 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
784 frame->has_no_damage = true; 791 frame->has_no_damage = true;
785 DCHECK(!resourceless_software_draw_); 792 DCHECK(!resourceless_software_draw_);
786 return DRAW_SUCCESS; 793 return DRAW_SUCCESS;
787 } 794 }
788 795
789 TRACE_EVENT_BEGIN2( 796 TRACE_EVENT_BEGIN2(
790 "cc", "LayerTreeHostImpl::CalculateRenderPasses", 797 "cc", "LayerTreeHostImpl::CalculateRenderPasses",
791 "render_surface_layer_list.size()", 798 "render_surface_layer_list.size()",
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after
4080 worker_context_visibility_ = 4087 worker_context_visibility_ =
4081 worker_context->CacheController()->ClientBecameVisible(); 4088 worker_context->CacheController()->ClientBecameVisible();
4082 } else { 4089 } else {
4083 worker_context->CacheController()->ClientBecameNotVisible( 4090 worker_context->CacheController()->ClientBecameNotVisible(
4084 std::move(worker_context_visibility_)); 4091 std::move(worker_context_visibility_));
4085 } 4092 }
4086 } 4093 }
4087 } 4094 }
4088 4095
4089 } // namespace cc 4096 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.h » ('j') | third_party/WebKit/Source/core/editing/SelectionController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698