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

Side by Side Diff: cc/occlusion_tracker.cc

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add damage tracker test, fix braces, include order. Created 8 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
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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/occlusion_tracker.h" 7 #include "cc/occlusion_tracker.h"
8 8
9 #include "CCLayerImpl.h" 9 #include "CCLayerImpl.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 template<typename LayerType, typename RenderSurfaceType> 94 template<typename LayerType, typename RenderSurfaceType>
95 void CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::finishedRenderTarget( const LayerType* finishedTarget) 95 void CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::finishedRenderTarget( const LayerType* finishedTarget)
96 { 96 {
97 // Make sure we know about the target surface. 97 // Make sure we know about the target surface.
98 enterRenderTarget(finishedTarget); 98 enterRenderTarget(finishedTarget);
99 99
100 RenderSurfaceType* surface = finishedTarget->renderSurface(); 100 RenderSurfaceType* surface = finishedTarget->renderSurface();
101 101
102 // If the occlusion within the surface can not be applied to things outside of the surface's subtree, then clear the occlusion here so it won't be used. 102 // If the occlusion within the surface can not be applied to things outside of the surface's subtree, then clear the occlusion here so it won't be used.
103 if (finishedTarget->maskLayer() || !surfaceOpacityKnown(surface) || surface- >drawOpacity() < 1 || finishedTarget->filters().hasFilterThatAffectsOpacity()) { 103 // TODO(senorblanco): Make this smarter for SkImageFilter case: once
104 // SkImageFilters can report affectsOpacity(), call that.
105 if (finishedTarget->maskLayer() || !surfaceOpacityKnown(surface) || surface- >drawOpacity() < 1 || finishedTarget->filters().hasFilterThatAffectsOpacity() || finishedTarget->filter()) {
104 m_stack.last().occlusionInScreen = Region(); 106 m_stack.last().occlusionInScreen = Region();
105 m_stack.last().occlusionInTarget = Region(); 107 m_stack.last().occlusionInTarget = Region();
106 } else { 108 } else {
107 if (!surfaceTransformsToTargetKnown(surface)) 109 if (!surfaceTransformsToTargetKnown(surface))
108 m_stack.last().occlusionInTarget = Region(); 110 m_stack.last().occlusionInTarget = Region();
109 if (!surfaceTransformsToScreenKnown(surface)) 111 if (!surfaceTransformsToScreenKnown(surface))
110 m_stack.last().occlusionInScreen = Region(); 112 m_stack.last().occlusionInScreen = Region();
111 } 113 }
112 } 114 }
113 115
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::finishedRend erTarget(const CCLayerImpl* finishedTarget); 472 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::finishedRend erTarget(const CCLayerImpl* finishedTarget);
471 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::leaveToRende rTarget(const CCLayerImpl* newTarget); 473 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::leaveToRende rTarget(const CCLayerImpl* newTarget);
472 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::markOccluded BehindLayer(const CCLayerImpl*); 474 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::markOccluded BehindLayer(const CCLayerImpl*);
473 template bool CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::occluded(con st CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTarget Surface) const; 475 template bool CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::occluded(con st CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTarget Surface) const;
474 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude dContentRect(const CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionF romOutsideTargetSurface) const; 476 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude dContentRect(const CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionF romOutsideTargetSurface) const;
475 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude dContributingSurfaceContentRect(const CCLayerImpl*, bool forReplica, const IntRe ct& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const; 477 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude dContributingSurfaceContentRect(const CCLayerImpl*, bool forReplica, const IntRe ct& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
476 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerClip RectInTarget(const CCLayerImpl*) const; 478 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerClip RectInTarget(const CCLayerImpl*) const;
477 479
478 480
479 } // namespace cc 481 } // namespace cc
OLDNEW
« cc/gl_renderer.cc ('K') | « cc/layer_tree_host_impl.cc ('k') | cc/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698