| Index: cc/occlusion_tracker.h
|
| diff --git a/cc/occlusion_tracker.h b/cc/occlusion_tracker.h
|
| index affd9c5dc194eb859d7a394e48e1733f30cb3ead..811c9cbd86923208d7f0ab5aba9998597259f23b 100644
|
| --- a/cc/occlusion_tracker.h
|
| +++ b/cc/occlusion_tracker.h
|
| @@ -11,26 +11,26 @@
|
| #include "Region.h"
|
|
|
| namespace cc {
|
| -class CCOverdrawMetrics;
|
| -class CCLayerImpl;
|
| -class CCRenderSurface;
|
| -class LayerChromium;
|
| -class RenderSurfaceChromium;
|
| +class OverdrawMetrics;
|
| +class LayerImpl;
|
| +class RenderSurfaceImpl;
|
| +class Layer;
|
| +class RenderSurface;
|
|
|
| // This class is used to track occlusion of layers while traversing them in a front-to-back order. As each layer is visited, one of the
|
| // methods in this class is called to notify it about the current target surface.
|
| // Then, occlusion in the content space of the current layer may be queried, via methods such as occluded() and unoccludedContentRect().
|
| -// If the current layer owns a RenderSurface, then occlusion on that RenderSurface may also be queried via surfaceOccluded() and surfaceUnoccludedContentRect().
|
| +// If the current layer owns a RenderSurfaceImpl, then occlusion on that RenderSurfaceImpl may also be queried via surfaceOccluded() and surfaceUnoccludedContentRect().
|
| // Finally, once finished with the layer, occlusion behind the layer should be marked by calling markOccludedBehindLayer().
|
| template<typename LayerType, typename RenderSurfaceType>
|
| -class CCOcclusionTrackerBase {
|
| +class OcclusionTrackerBase {
|
| public:
|
| - CCOcclusionTrackerBase(IntRect rootTargetRect, bool recordMetricsForFrame);
|
| + OcclusionTrackerBase(IntRect rootTargetRect, bool recordMetricsForFrame);
|
|
|
| - // Called at the beginning of each step in the CCLayerIterator's front-to-back traversal.
|
| - void enterLayer(const CCLayerIteratorPosition<LayerType>&);
|
| - // Called at the end of each step in the CCLayerIterator's front-to-back traversal.
|
| - void leaveLayer(const CCLayerIteratorPosition<LayerType>&);
|
| + // Called at the beginning of each step in the LayerIterator's front-to-back traversal.
|
| + void enterLayer(const LayerIteratorPosition<LayerType>&);
|
| + // Called at the end of each step in the LayerIterator's front-to-back traversal.
|
| + void leaveLayer(const LayerIteratorPosition<LayerType>&);
|
|
|
| // Returns true if the given rect in content space for the layer is fully occluded in either screen space or the layer's target surface.
|
| bool occluded(const LayerType*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
|
| @@ -42,7 +42,7 @@ public:
|
| IntRect unoccludedContributingSurfaceContentRect(const LayerType*, bool forReplica, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
|
|
|
| // Report operations for recording overdraw metrics.
|
| - CCOverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get(); }
|
| + OverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get(); }
|
|
|
| // Gives the region of the screen that is not occluded by something opaque.
|
| Region computeVisibleRegionInScreen() const { return subtract(Region(m_rootTargetRect), m_stack.last().occlusionInScreen); }
|
| @@ -61,7 +61,7 @@ protected:
|
| Region occlusionInTarget;
|
| };
|
|
|
| - // The stack holds occluded regions for subtrees in the RenderSurface-Layer tree, so that when we leave a subtree we may
|
| + // The stack holds occluded regions for subtrees in the RenderSurfaceImpl-Layer tree, so that when we leave a subtree we may
|
| // apply a mask to it, but not to the parts outside the subtree.
|
| // - The first time we see a new subtree under a target, we add that target to the top of the stack. This can happen as a layer representing itself, or as a target surface.
|
| // - When we visit a target surface, we apply its mask to its subtree, which is at the top of the stack.
|
| @@ -89,17 +89,17 @@ private:
|
| void markOccludedBehindLayer(const LayerType*);
|
|
|
| IntRect m_rootTargetRect;
|
| - scoped_ptr<CCOverdrawMetrics> m_overdrawMetrics;
|
| + scoped_ptr<OverdrawMetrics> m_overdrawMetrics;
|
| IntSize m_minimumTrackingSize;
|
|
|
| // This is used for visualizing the occlusion tracking process.
|
| Vector<IntRect>* m_occludingScreenSpaceRects;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(CCOcclusionTrackerBase);
|
| + DISALLOW_COPY_AND_ASSIGN(OcclusionTrackerBase);
|
| };
|
|
|
| -typedef CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium> CCOcclusionTracker;
|
| -typedef CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface> CCOcclusionTrackerImpl;
|
| +typedef OcclusionTrackerBase<Layer, RenderSurface> OcclusionTracker;
|
| +typedef OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl> OcclusionTrackerImpl;
|
|
|
| }
|
| #endif // CCOcclusionTracker_h
|
|
|