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

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

Issue 21154002: Add support for converting cc::FilterOperations into an SkImageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cc_messages Created 7 years, 3 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
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 // If the occlusion within the surface can not be applied to things outside of 234 // If the occlusion within the surface can not be applied to things outside of
235 // the surface's subtree, then clear the occlusion here so it won't be used. 235 // the surface's subtree, then clear the occlusion here so it won't be used.
236 // TODO(senorblanco): Make this smarter for SkImageFilter case: once 236 // TODO(senorblanco): Make this smarter for SkImageFilter case: once
237 // SkImageFilters can report affectsOpacity(), call that. 237 // SkImageFilters can report affectsOpacity(), call that.
238 if (finished_target->mask_layer() || 238 if (finished_target->mask_layer() ||
239 !SurfaceOpacityKnown(surface) || 239 !SurfaceOpacityKnown(surface) ||
240 surface->draw_opacity() < 1 || 240 surface->draw_opacity() < 1 ||
241 target_is_only_for_copy_request || 241 target_is_only_for_copy_request ||
242 finished_target->filters().HasFilterThatAffectsOpacity() || 242 finished_target->filters().HasFilterThatAffectsOpacity() ||
243 finished_target->filter()) { 243 finished_target->filters().HasReferenceFilter()) {
danakj 2013/09/09 22:04:50 can't this just be removed?
ajuma 2013/09/10 21:17:58 Yes, removed this and moved the TODO from above to
244 stack_.back().occlusion_from_outside_target.Clear(); 244 stack_.back().occlusion_from_outside_target.Clear();
245 stack_.back().occlusion_from_inside_target.Clear(); 245 stack_.back().occlusion_from_inside_target.Clear();
246 } else if (!SurfaceTransformsToTargetKnown(surface)) { 246 } else if (!SurfaceTransformsToTargetKnown(surface)) {
247 stack_.back().occlusion_from_inside_target.Clear(); 247 stack_.back().occlusion_from_inside_target.Clear();
248 stack_.back().occlusion_from_outside_target.Clear(); 248 stack_.back().occlusion_from_outside_target.Clear();
249 } 249 }
250 } 250 }
251 251
252 template <typename LayerType> 252 template <typename LayerType>
253 static void ReduceOcclusionBelowSurface(LayerType* contributing_layer, 253 static void ReduceOcclusionBelowSurface(LayerType* contributing_layer,
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 } 737 }
738 738
739 return unoccluded_rect; 739 return unoccluded_rect;
740 } 740 }
741 741
742 // Instantiate (and export) templates here for the linker. 742 // Instantiate (and export) templates here for the linker.
743 template class OcclusionTrackerBase<Layer, RenderSurface>; 743 template class OcclusionTrackerBase<Layer, RenderSurface>;
744 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; 744 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>;
745 745
746 } // namespace cc 746 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698