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

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

Issue 187343007: Adding fading effect for paint rectangles in HUD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes. Created 6 years, 9 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 // frame at all. 709 // frame at all.
710 RenderSurfaceImpl* root_surface = 710 RenderSurfaceImpl* root_surface =
711 active_tree_->root_layer()->render_surface(); 711 active_tree_->root_layer()->render_surface();
712 bool root_surface_has_no_visible_damage = 712 bool root_surface_has_no_visible_damage =
713 !root_surface->damage_tracker()->current_damage_rect().Intersects( 713 !root_surface->damage_tracker()->current_damage_rect().Intersects(
714 root_surface->content_rect()); 714 root_surface->content_rect());
715 bool root_surface_has_contributing_layers = 715 bool root_surface_has_contributing_layers =
716 !root_surface->layer_list().empty(); 716 !root_surface->layer_list().empty();
717 if (root_surface_has_contributing_layers && 717 if (root_surface_has_contributing_layers &&
718 root_surface_has_no_visible_damage && 718 root_surface_has_no_visible_damage &&
719 active_tree_->LayersWithCopyOutputRequest().empty()) { 719 active_tree_->LayersWithCopyOutputRequest().empty() &&
720 (!active_tree_->hud_layer() ||
721 !active_tree_->hud_layer()->NeedsUpdate())) {
720 TRACE_EVENT0("cc", 722 TRACE_EVENT0("cc",
721 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect"); 723 "LayerTreeHostImpl::CalculateRenderPasses::EmptyDamageRect");
722 frame->has_no_damage = true; 724 frame->has_no_damage = true;
723 DCHECK(!output_surface_->capabilities() 725 DCHECK(!output_surface_->capabilities()
724 .draw_and_swap_full_viewport_every_frame); 726 .draw_and_swap_full_viewport_every_frame);
725 return DrawSwapReadbackResult::DRAW_SUCCESS; 727 return DrawSwapReadbackResult::DRAW_SUCCESS;
726 } 728 }
727 729
728 TRACE_EVENT1("cc", 730 TRACE_EVENT1("cc",
729 "LayerTreeHostImpl::CalculateRenderPasses", 731 "LayerTreeHostImpl::CalculateRenderPasses",
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after
3026 swap_promise_monitor_.erase(monitor); 3028 swap_promise_monitor_.erase(monitor);
3027 } 3029 }
3028 3030
3029 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3031 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3030 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3032 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3031 for (; it != swap_promise_monitor_.end(); it++) 3033 for (; it != swap_promise_monitor_.end(); it++)
3032 (*it)->OnSetNeedsRedrawOnImpl(); 3034 (*it)->OnSetNeedsRedrawOnImpl();
3033 } 3035 }
3034 3036
3035 } // namespace cc 3037 } // namespace cc
OLDNEW
« cc/layers/heads_up_display_layer_impl.cc ('K') | « cc/layers/heads_up_display_layer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698