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

Unified 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: move mouse/keyboard handle clearing to blink Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 30de9244e1f9f394e5109c14b6bb4f78b37dfbd6..a7fa0b4b3eec4272d2717ab1c205d4fa4afffced 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -767,7 +767,9 @@ static RenderPass* FindRenderPassById(const RenderPassList& list,
return it == list.end() ? nullptr : it->get();
}
-DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
+DrawResult LayerTreeHostImpl::CalculateRenderPasses(
+ FrameData* frame,
+ bool handle_visibility_changed) {
DCHECK(frame->render_passes.empty());
DCHECK(CanDraw());
DCHECK(!active_tree_->LayerListIsEmpty());
@@ -789,7 +791,13 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) {
if (root_surface_has_contributing_layers &&
root_surface_has_no_visible_damage &&
!active_tree_->property_trees()->effect_tree.HasCopyRequests() &&
- !resources_must_be_resent && !hud_wants_to_draw_) {
+ !resources_must_be_resent && !hud_wants_to_draw_ &&
+ // When touch handle visibility changes there is no visible damage
+ // because touch handles are composited in the browser. However we
+ // still want the browser to be notified that the handles changed
+ // through the |ViewHostMsg_SwapCompositorFrame| IPC so we keep
+ // track of handle visibility changes through |handle_visibility_changed|.
+ !handle_visibility_changed) {
TRACE_EVENT0("cc",
"LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
frame->has_no_damage = true;
@@ -1097,7 +1105,8 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
device_viewport_damage_rect);
}
- DrawResult draw_result = CalculateRenderPasses(frame);
+ DrawResult draw_result = CalculateRenderPasses(
+ frame, active_tree_->GetAndResetHandleVisibilityChanged());
danakj 2016/10/21 20:53:33 can you call this from inside CalculateRenderPasse
amaralp 2016/10/26 05:03:40 Done
if (draw_result != DRAW_SUCCESS) {
DCHECK(!resourceless_software_draw_);
return draw_result;
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698