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

Side by Side Diff: cc/trees/occlusion_tracker.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_impl.cc ('k') | cc/trees/occlusion_tracker_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/debug/overdraw_metrics.h" 10 #include "cc/debug/overdraw_metrics.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 402
403 template <typename LayerType, typename RenderSurfaceType> 403 template <typename LayerType, typename RenderSurfaceType>
404 void OcclusionTrackerBase<LayerType, RenderSurfaceType>:: 404 void OcclusionTrackerBase<LayerType, RenderSurfaceType>::
405 MarkOccludedBehindLayer(const LayerType* layer) { 405 MarkOccludedBehindLayer(const LayerType* layer) {
406 DCHECK(!stack_.empty()); 406 DCHECK(!stack_.empty());
407 DCHECK_EQ(layer->render_target(), stack_.back().target); 407 DCHECK_EQ(layer->render_target(), stack_.back().target);
408 if (stack_.empty()) 408 if (stack_.empty())
409 return; 409 return;
410 410
411 if (!layer->DrawsContent()) 411 if (layer->draw_properties().skip_drawing)
412 return; 412 return;
413 413
414 if (!LayerOpacityKnown(layer) || layer->draw_opacity() < 1) 414 if (!LayerOpacityKnown(layer) || layer->draw_opacity() < 1)
415 return; 415 return;
416 416
417 if (LayerIsInUnsorted3dRenderingContext(layer)) 417 if (LayerIsInUnsorted3dRenderingContext(layer))
418 return; 418 return;
419 419
420 if (!LayerTransformsToTargetKnown(layer)) 420 if (!LayerTransformsToTargetKnown(layer))
421 return; 421 return;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 unoccluded_rect.Intersect(content_rect); 678 unoccluded_rect.Intersect(content_rect);
679 679
680 return unoccluded_rect; 680 return unoccluded_rect;
681 } 681 }
682 682
683 // Instantiate (and export) templates here for the linker. 683 // Instantiate (and export) templates here for the linker.
684 template class OcclusionTrackerBase<Layer, RenderSurface>; 684 template class OcclusionTrackerBase<Layer, RenderSurface>;
685 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; 685 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>;
686 686
687 } // namespace cc 687 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698