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

Unified Diff: cc/occlusion_tracker.h

Issue 11366094: cc: Create a Region class that wraps SkRegion, to replace use of WebCore::Region. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move deg2rad etc to MathUtil 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 side-by-side diff with in-line comments
Download patch
Index: cc/occlusion_tracker.h
diff --git a/cc/occlusion_tracker.h b/cc/occlusion_tracker.h
index 10c86f82d6c8b924462f6ada1d7fae09145305cc..bd4e198754e93783fb45fbeba03110f5a3c42c96 100644
--- a/cc/occlusion_tracker.h
+++ b/cc/occlusion_tracker.h
@@ -5,10 +5,10 @@
#ifndef CC_OCCLUSION_TRACKER_H_
#define CC_OCCLUSION_TRACKER_H_
-#include "Region.h"
#include "base/basictypes.h"
#include "cc/cc_export.h"
#include "cc/layer_iterator.h"
+#include "cc/region.h"
#include "ui/gfx/rect.h"
namespace cc {
@@ -47,7 +47,7 @@ public:
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); }
+ Region computeVisibleRegionInScreen() const { return SubtractRegions(m_rootTargetRect, m_stack.back().occlusionInScreen); }
void setMinimumTrackingSize(const gfx::Size& size) { m_minimumTrackingSize = size; }
@@ -70,7 +70,7 @@ protected:
// - When we visit a layer representing itself, we add its occlusion to the current subtree, which is at the top of the stack.
// - When we visit a layer representing a contributing surface, the current target will never be the top of the stack since we just came from the contributing surface.
// We merge the occlusion at the top of the stack with the new current subtree. This new target is pushed onto the stack if not already there.
- Vector<StackObject, 1> m_stack;
+ std::vector<StackObject> m_stack;
// Allow tests to override this.
virtual gfx::Rect layerClipRectInTarget(const LayerType*) const;

Powered by Google App Engine
This is Rietveld 408576698