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

Unified Diff: cc/trees/occlusion_tracker.h

Issue 202523002: cc: Replace Region with SimpleEnclosedRegion for occlusion tracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpleregion: . Created 6 years, 4 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/trees/layer_tree_host_unittest_occlusion.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker.h
diff --git a/cc/trees/occlusion_tracker.h b/cc/trees/occlusion_tracker.h
index 78b992cd1c55895ed19f6cc617370ba62650a366..8d07f434cf3b79ba409b0b27f73d4e927ef23c44 100644
--- a/cc/trees/occlusion_tracker.h
+++ b/cc/trees/occlusion_tracker.h
@@ -9,12 +9,13 @@
#include "base/basictypes.h"
#include "cc/base/cc_export.h"
-#include "cc/base/region.h"
+#include "cc/base/simple_enclosed_region.h"
#include "cc/layers/layer_iterator.h"
#include "ui/gfx/rect.h"
namespace cc {
class LayerImpl;
+class Region;
class RenderSurfaceImpl;
class Layer;
class RenderSurface;
@@ -64,11 +65,7 @@ class CC_EXPORT OcclusionTracker {
const gfx::Transform& draw_transform) const;
// Gives the region of the screen that is not occluded by something opaque.
- Region ComputeVisibleRegionInScreen() const {
- DCHECK(!stack_.back().target->parent());
- return SubtractRegions(screen_space_clip_rect_,
- stack_.back().occlusion_from_inside_target);
- }
+ Region ComputeVisibleRegionInScreen() const;
void set_minimum_tracking_size(const gfx::Size& size) {
minimum_tracking_size_ = size;
@@ -89,8 +86,8 @@ class CC_EXPORT OcclusionTracker {
StackObject() : target(0) {}
explicit StackObject(const LayerType* target) : target(target) {}
const LayerType* target;
- Region occlusion_from_outside_target;
- Region occlusion_from_inside_target;
+ SimpleEnclosedRegion occlusion_from_outside_target;
+ SimpleEnclosedRegion occlusion_from_inside_target;
};
// The stack holds occluded regions for subtrees in the
« no previous file with comments | « cc/trees/layer_tree_host_unittest_occlusion.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698