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

Side by Side Diff: cc/CCOcclusionTracker.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerTreeHostImpl.cpp ('k') | cc/CCOcclusionTracker.cpp » ('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 #ifndef CCOcclusionTracker_h 5 #ifndef CCOcclusionTracker_h
6 #define CCOcclusionTracker_h 6 #define CCOcclusionTracker_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "CCLayerIterator.h" 9 #include "CCLayerIterator.h"
10 #include "FloatQuad.h" 10 #include "FloatQuad.h"
(...skipping 17 matching lines...) Expand all
28 CCOcclusionTrackerBase(IntRect rootTargetRect, bool recordMetricsForFrame); 28 CCOcclusionTrackerBase(IntRect rootTargetRect, bool recordMetricsForFrame);
29 29
30 // Called at the beginning of each step in the CCLayerIterator's front-to-ba ck traversal. 30 // Called at the beginning of each step in the CCLayerIterator's front-to-ba ck traversal.
31 void enterLayer(const CCLayerIteratorPosition<LayerType>&); 31 void enterLayer(const CCLayerIteratorPosition<LayerType>&);
32 // Called at the end of each step in the CCLayerIterator's front-to-back tra versal. 32 // Called at the end of each step in the CCLayerIterator's front-to-back tra versal.
33 void leaveLayer(const CCLayerIteratorPosition<LayerType>&); 33 void leaveLayer(const CCLayerIteratorPosition<LayerType>&);
34 34
35 // Returns true if the given rect in content space for the layer is fully oc cluded in either screen space or the layer's target surface. 35 // Returns true if the given rect in content space for the layer is fully oc cluded in either screen space or the layer's target surface.
36 bool occluded(const LayerType*, const IntRect& contentRect, bool* hasOcclusi onFromOutsideTargetSurface = 0) const; 36 bool occluded(const LayerType*, const IntRect& contentRect, bool* hasOcclusi onFromOutsideTargetSurface = 0) const;
37 // Gives an unoccluded sub-rect of |contentRect| in the content space of the layer. Used when considering occlusion for a layer that paints/draws something. 37 // Gives an unoccluded sub-rect of |contentRect| in the content space of the layer. Used when considering occlusion for a layer that paints/draws something.
38 IntRect unoccludedContentRect(const LayerType*, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface = 0) const; 38 IntRect unoccludedContentRect(const LayerType*, const IntRect& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool transformsToTargetKno wn, const IntRect& clipRectInTarget, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
39 39
40 // Gives an unoccluded sub-rect of |contentRect| in the content space of the renderTarget owned by the layer. 40 // Gives an unoccluded sub-rect of |contentRect| in the content space of the renderTarget owned by the layer.
41 // Used when considering occlusion for a contributing surface that is render ing into another target. 41 // Used when considering occlusion for a contributing surface that is render ing into another target.
42 IntRect unoccludedContributingSurfaceContentRect(const LayerType*, bool forR eplica, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface = 0) const; 42 IntRect unoccludedContributingSurfaceContentRect(const LayerType*, bool forR eplica, const IntRect& contentRect, bool* hasOcclusionFromOutsideTargetSurface = 0) const;
43 43
44 // Report operations for recording overdraw metrics. 44 // Report operations for recording overdraw metrics.
45 CCOverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get() ; } 45 CCOverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get() ; }
46 46
47 // Gives the region of the screen that is not occluded by something opaque. 47 // Gives the region of the screen that is not occluded by something opaque.
48 Region computeVisibleRegionInScreen() const { return subtract(Region(m_rootT argetRect), m_stack.last().occlusionInScreen); } 48 Region computeVisibleRegionInScreen() const { return subtract(Region(m_rootT argetRect), m_stack.last().occlusionInScreen); }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Vector<IntRect>* m_occludingScreenSpaceRects; 96 Vector<IntRect>* m_occludingScreenSpaceRects;
97 97
98 DISALLOW_COPY_AND_ASSIGN(CCOcclusionTrackerBase); 98 DISALLOW_COPY_AND_ASSIGN(CCOcclusionTrackerBase);
99 }; 99 };
100 100
101 typedef CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium> CCOcclusion Tracker; 101 typedef CCOcclusionTrackerBase<LayerChromium, RenderSurfaceChromium> CCOcclusion Tracker;
102 typedef CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface> CCOcclusionTrackerI mpl; 102 typedef CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface> CCOcclusionTrackerI mpl;
103 103
104 } 104 }
105 #endif // CCOcclusionTracker_h 105 #endif // CCOcclusionTracker_h
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostImpl.cpp ('k') | cc/CCOcclusionTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698