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

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

Issue 23708021: Do not clip inside OcclusionTracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | cc/trees/occlusion_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 contributing_render_pass, 761 contributing_render_pass,
762 occlusion_tracker, 762 occlusion_tracker,
763 &append_quads_data); 763 &append_quads_data);
764 } else if (it.represents_itself() && 764 } else if (it.represents_itself() &&
765 !it->visible_content_rect().IsEmpty()) { 765 !it->visible_content_rect().IsEmpty()) {
766 bool impl_draw_transform_is_unknown = false; 766 bool impl_draw_transform_is_unknown = false;
767 bool occluded = occlusion_tracker.Occluded( 767 bool occluded = occlusion_tracker.Occluded(
768 it->render_target(), 768 it->render_target(),
769 it->visible_content_rect(), 769 it->visible_content_rect(),
770 it->draw_transform(), 770 it->draw_transform(),
771 impl_draw_transform_is_unknown, 771 impl_draw_transform_is_unknown);
772 it->is_clipped(),
773 it->clip_rect());
774 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { 772 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) {
775 DCHECK_EQ(active_tree_, it->layer_tree_impl()); 773 DCHECK_EQ(active_tree_, it->layer_tree_impl());
776 774
777 frame->will_draw_layers.push_back(*it); 775 frame->will_draw_layers.push_back(*it);
778 776
779 if (it->HasContributingDelegatedRenderPasses()) { 777 if (it->HasContributingDelegatedRenderPasses()) {
780 RenderPass::Id contributing_render_pass_id = 778 RenderPass::Id contributing_render_pass_id =
781 it->FirstContributingRenderPassId(); 779 it->FirstContributingRenderPassId();
782 while (frame->render_passes_by_id.find(contributing_render_pass_id) != 780 while (frame->render_passes_by_id.find(contributing_render_pass_id) !=
783 frame->render_passes_by_id.end()) { 781 frame->render_passes_by_id.end()) {
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 std::set<UIResourceId>::iterator found_in_evicted = 2800 std::set<UIResourceId>::iterator found_in_evicted =
2803 evicted_ui_resources_.find(uid); 2801 evicted_ui_resources_.find(uid);
2804 if (found_in_evicted == evicted_ui_resources_.end()) 2802 if (found_in_evicted == evicted_ui_resources_.end())
2805 return; 2803 return;
2806 evicted_ui_resources_.erase(found_in_evicted); 2804 evicted_ui_resources_.erase(found_in_evicted);
2807 if (evicted_ui_resources_.empty()) 2805 if (evicted_ui_resources_.empty())
2808 client_->OnCanDrawStateChanged(CanDraw()); 2806 client_->OnCanDrawStateChanged(CanDraw());
2809 } 2807 }
2810 2808
2811 } // namespace cc 2809 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | cc/trees/occlusion_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698