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

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

Issue 26112002: cc: Fix hit-testing in zero-opacity layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 it->render_surface()->contributes_to_drawn_surface()) { 748 it->render_surface()->contributes_to_drawn_surface()) {
749 RenderPass::Id contributing_render_pass_id = 749 RenderPass::Id contributing_render_pass_id =
750 it->render_surface()->RenderPassId(); 750 it->render_surface()->RenderPassId();
751 RenderPass* contributing_render_pass = 751 RenderPass* contributing_render_pass =
752 frame->render_passes_by_id[contributing_render_pass_id]; 752 frame->render_passes_by_id[contributing_render_pass_id];
753 AppendQuadsForRenderSurfaceLayer(target_render_pass, 753 AppendQuadsForRenderSurfaceLayer(target_render_pass,
754 *it, 754 *it,
755 contributing_render_pass, 755 contributing_render_pass,
756 occlusion_tracker, 756 occlusion_tracker,
757 &append_quads_data); 757 &append_quads_data);
758 } else if (it.represents_itself() && it->DrawsContent() && 758 } else if (it.represents_itself() &&
759 !it->draw_properties().skip_drawing &&
759 !it->visible_content_rect().IsEmpty()) { 760 !it->visible_content_rect().IsEmpty()) {
760 bool impl_draw_transform_is_unknown = false; 761 bool impl_draw_transform_is_unknown = false;
761 bool occluded = occlusion_tracker.Occluded( 762 bool occluded = occlusion_tracker.Occluded(
762 it->render_target(), 763 it->render_target(),
763 it->visible_content_rect(), 764 it->visible_content_rect(),
764 it->draw_transform(), 765 it->draw_transform(),
765 impl_draw_transform_is_unknown); 766 impl_draw_transform_is_unknown);
766 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) { 767 if (!occluded && it->WillDraw(draw_mode, resource_provider_.get())) {
767 DCHECK_EQ(active_tree_, it->layer_tree_impl()); 768 DCHECK_EQ(active_tree_, it->layer_tree_impl());
768 769
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2802 std::set<UIResourceId>::iterator found_in_evicted = 2803 std::set<UIResourceId>::iterator found_in_evicted =
2803 evicted_ui_resources_.find(uid); 2804 evicted_ui_resources_.find(uid);
2804 if (found_in_evicted == evicted_ui_resources_.end()) 2805 if (found_in_evicted == evicted_ui_resources_.end())
2805 return; 2806 return;
2806 evicted_ui_resources_.erase(found_in_evicted); 2807 evicted_ui_resources_.erase(found_in_evicted);
2807 if (evicted_ui_resources_.empty()) 2808 if (evicted_ui_resources_.empty())
2808 client_->OnCanDrawStateChanged(CanDraw()); 2809 client_->OnCanDrawStateChanged(CanDraw());
2809 } 2810 }
2810 2811
2811 } // namespace cc 2812 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698