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

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: fixing clear handles Created 4 years, 1 month 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface(); 776 RenderSurfaceImpl* root_surface = active_tree_->RootRenderSurface();
777 bool root_surface_has_no_visible_damage = 777 bool root_surface_has_no_visible_damage =
778 !root_surface->damage_tracker()->current_damage_rect().Intersects( 778 !root_surface->damage_tracker()->current_damage_rect().Intersects(
779 root_surface->content_rect()); 779 root_surface->content_rect());
780 bool root_surface_has_contributing_layers = 780 bool root_surface_has_contributing_layers =
781 !root_surface->layer_list().empty(); 781 !root_surface->layer_list().empty();
782 bool hud_wants_to_draw_ = active_tree_->hud_layer() && 782 bool hud_wants_to_draw_ = active_tree_->hud_layer() &&
783 active_tree_->hud_layer()->IsAnimatingHUDContents(); 783 active_tree_->hud_layer()->IsAnimatingHUDContents();
784 bool resources_must_be_resent = 784 bool resources_must_be_resent =
785 compositor_frame_sink_->capabilities().can_force_reclaim_resources; 785 compositor_frame_sink_->capabilities().can_force_reclaim_resources;
786 // When touch handle visibility changes there is no visible damage
787 // because touch handles are composited in the browser. However we
788 // still want the browser to be notified that the handles changed
789 // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep
790 // track of handle visibility changes through |handle_visibility_changed|.
791 bool handle_visibility_changed =
792 active_tree_->GetAndResetHandleVisibilityChanged();
786 if (root_surface_has_contributing_layers && 793 if (root_surface_has_contributing_layers &&
787 root_surface_has_no_visible_damage && 794 root_surface_has_no_visible_damage &&
788 !active_tree_->property_trees()->effect_tree.HasCopyRequests() && 795 !active_tree_->property_trees()->effect_tree.HasCopyRequests() &&
789 !resources_must_be_resent && !hud_wants_to_draw_) { 796 !resources_must_be_resent && !hud_wants_to_draw_ &&
797 !handle_visibility_changed) {
790 TRACE_EVENT0("cc", 798 TRACE_EVENT0("cc",
791 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); 799 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
792 frame->has_no_damage = true; 800 frame->has_no_damage = true;
793 DCHECK(!resourceless_software_draw_); 801 DCHECK(!resourceless_software_draw_);
794 return DRAW_SUCCESS; 802 return DRAW_SUCCESS;
795 } 803 }
796 804
797 TRACE_EVENT_BEGIN2( 805 TRACE_EVENT_BEGIN2(
798 "cc", "LayerTreeHostImpl::CalculateRenderPasses", 806 "cc", "LayerTreeHostImpl::CalculateRenderPasses",
799 "render_surface_layer_list.size()", 807 "render_surface_layer_list.size()",
(...skipping 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 if (is_visible) { 4092 if (is_visible) {
4085 worker_context_visibility_ = 4093 worker_context_visibility_ =
4086 worker_context->CacheController()->ClientBecameVisible(); 4094 worker_context->CacheController()->ClientBecameVisible();
4087 } else { 4095 } else {
4088 worker_context->CacheController()->ClientBecameNotVisible( 4096 worker_context->CacheController()->ClientBecameNotVisible(
4089 std::move(worker_context_visibility_)); 4097 std::move(worker_context_visibility_));
4090 } 4098 }
4091 } 4099 }
4092 4100
4093 } // namespace cc 4101 } // 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