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

Side by Side Diff: cc/occlusion_tracker.h

Issue 11275113: Remove most remaining references to IntRect and FloatRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compositor bindings Created 8 years, 1 month 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/math_util.cc ('k') | cc/occlusion_tracker.cc » ('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 "FloatQuad.h" 8 #include "FloatQuad.h"
9 #include "Region.h" 9 #include "Region.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 gfx::Rect unoccludedContentRect(const LayerType* renderTarget, const gfx::Re ct& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool impl DrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusion FromOutsideTargetSurface = 0) const; 39 gfx::Rect unoccludedContentRect(const LayerType* renderTarget, const gfx::Re ct& contentRect, const WebKit::WebTransformationMatrix& drawTransform, bool impl DrawTransformIsUnknown, const gfx::Rect& clippedRectInTarget, bool* hasOcclusion FromOutsideTargetSurface = 0) const;
40 40
41 // Gives an unoccluded sub-rect of |contentRect| in the content space of the renderTarget owned by the layer. 41 // Gives an unoccluded sub-rect of |contentRect| in the content space of the renderTarget owned by the layer.
42 // Used when considering occlusion for a contributing surface that is render ing into another target. 42 // Used when considering occlusion for a contributing surface that is render ing into another target.
43 gfx::Rect unoccludedContributingSurfaceContentRect(const LayerType*, bool fo rReplica, const gfx::Rect& contentRect, bool* hasOcclusionFromOutsideTargetSurfa ce = 0) const; 43 gfx::Rect unoccludedContributingSurfaceContentRect(const LayerType*, bool fo rReplica, const gfx::Rect& contentRect, bool* hasOcclusionFromOutsideTargetSurfa ce = 0) const;
44 44
45 // Report operations for recording overdraw metrics. 45 // Report operations for recording overdraw metrics.
46 OverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get(); } 46 OverdrawMetrics& overdrawMetrics() const { return *m_overdrawMetrics.get(); }
47 47
48 // Gives the region of the screen that is not occluded by something opaque. 48 // Gives the region of the screen that is not occluded by something opaque.
49 Region computeVisibleRegionInScreen() const { return subtract(Region(cc::Int Rect(m_rootTargetRect)), m_stack.last().occlusionInScreen); } 49 Region computeVisibleRegionInScreen() const { return subtract(Region(m_rootT argetRect), m_stack.last().occlusionInScreen); }
50 50
51 void setMinimumTrackingSize(const gfx::Size& size) { m_minimumTrackingSize = size; } 51 void setMinimumTrackingSize(const gfx::Size& size) { m_minimumTrackingSize = size; }
52 52
53 // The following is used for visualization purposes. 53 // The following is used for visualization purposes.
54 void setOccludingScreenSpaceRectsContainer(std::vector<gfx::Rect>* rects) { m_occludingScreenSpaceRects = rects; } 54 void setOccludingScreenSpaceRectsContainer(std::vector<gfx::Rect>* rects) { m_occludingScreenSpaceRects = rects; }
55 55
56 protected: 56 protected:
57 struct StackObject { 57 struct StackObject {
58 StackObject() : target(0) { } 58 StackObject() : target(0) { }
59 StackObject(const LayerType* target) : target(target) { } 59 StackObject(const LayerType* target) : target(target) { }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 DISALLOW_COPY_AND_ASSIGN(OcclusionTrackerBase); 99 DISALLOW_COPY_AND_ASSIGN(OcclusionTrackerBase);
100 }; 100 };
101 101
102 typedef OcclusionTrackerBase<Layer, RenderSurface> OcclusionTracker; 102 typedef OcclusionTrackerBase<Layer, RenderSurface> OcclusionTracker;
103 typedef OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl> OcclusionTrackerImpl; 103 typedef OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl> OcclusionTrackerImpl;
104 104
105 } // namespace cc 105 } // namespace cc
106 106
107 #endif // CCOcclusionTracker_h 107 #endif // CCOcclusionTracker_h
OLDNEW
« no previous file with comments | « cc/math_util.cc ('k') | cc/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698