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

Unified Diff: cc/CCOcclusionTracker.cpp

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCOcclusionTracker.h ('k') | cc/CCPrioritizedTextureManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCOcclusionTracker.cpp
diff --git a/cc/CCOcclusionTracker.cpp b/cc/CCOcclusionTracker.cpp
index bedb80c1e87e13359e44101818e4afd5ee324f01..4bb31c1ed6b0f743f7c4c7914f400f18c7f3aa26 100644
--- a/cc/CCOcclusionTracker.cpp
+++ b/cc/CCOcclusionTracker.cpp
@@ -362,7 +362,7 @@ static inline IntRect computeUnoccludedContentRect(const IntRect& contentRect, c
}
template<typename LayerType, typename RenderSurfaceType>
-IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::unoccludedContentRect(const LayerType* layer, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const
+IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::unoccludedContentRect(const LayerType* renderTarget, const IntRect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool transformsToTargetKnown, const IntRect& clipRectInTarget, bool* hasOcclusionFromOutsideTargetSurface) const
{
ASSERT(!m_stack.isEmpty());
if (m_stack.isEmpty())
@@ -370,18 +370,18 @@ IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::unoccludedContentR
if (contentRect.isEmpty())
return contentRect;
- ASSERT(layer->renderTarget() == m_stack.last().target);
+ ASSERT(renderTarget == m_stack.last().target);
// We want to return a rect that contains all the visible parts of |contentRect| in both screen space and in the target surface.
// So we find the visible parts of |contentRect| in each space, and take the intersection.
IntRect unoccludedInScreen = contentRect;
- if (layerTransformsToScreenKnown(layer))
- unoccludedInScreen = computeUnoccludedContentRect(contentRect, layer->screenSpaceTransform(), m_rootTargetRect, m_stack.last().occlusionInScreen);
+ if (layerTransformsToScreenKnown(renderTarget) && transformsToTargetKnown)
+ unoccludedInScreen = computeUnoccludedContentRect(contentRect, drawTransform * renderTarget->renderSurface()->screenSpaceTransform(), m_rootTargetRect, m_stack.last().occlusionInScreen);
IntRect unoccludedInTarget = contentRect;
- if (layerTransformsToTargetKnown(layer))
- unoccludedInTarget = computeUnoccludedContentRect(contentRect, layer->drawTransform(), layerClipRectInTarget(layer), m_stack.last().occlusionInTarget);
+ if (transformsToTargetKnown)
+ unoccludedInTarget = computeUnoccludedContentRect(contentRect, drawTransform, clipRectInTarget, m_stack.last().occlusionInTarget);
if (hasOcclusionFromOutsideTargetSurface)
*hasOcclusionFromOutsideTargetSurface = (intersection(unoccludedInScreen, unoccludedInTarget) != unoccludedInTarget);
@@ -461,7 +461,7 @@ template void CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::fini
template void CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::leaveToRenderTarget(const LayerChromium* newTarget);
template void CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::markOccludedBehindLayer(const LayerChromium*);
template bool CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::occluded(const LayerChromium*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
-template IntRect CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::unoccludedContentRect(const LayerChromium*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
+template IntRect CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::unoccludedContentRect(const LayerChromium*, const IntRect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool transformsToTargetKnown, const IntRect& clipRectInTarget, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
template IntRect CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::unoccludedContributingSurfaceContentRect(const LayerChromium*, bool forReplica, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
template IntRect CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium>::layerClipRectInTarget(const LayerChromium*) const;
@@ -473,7 +473,7 @@ template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::finishedRend
template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::leaveToRenderTarget(const CCLayerImpl* newTarget);
template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::markOccludedBehindLayer(const CCLayerImpl*);
template bool CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::occluded(const CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
-template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unoccludedContentRect(const CCLayerImpl*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
+template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unoccludedContentRect(const CCLayerImpl*, const IntRect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool transformsToTargetKnown, const IntRect& clipRectInTarget, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unoccludedContributingSurfaceContentRect(const CCLayerImpl*, bool forReplica, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface) const;
template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerClipRectInTarget(const CCLayerImpl*) const;
« no previous file with comments | « cc/CCOcclusionTracker.h ('k') | cc/CCPrioritizedTextureManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698