Chromium Code Reviews| Index: cc/trees/occlusion.h |
| diff --git a/cc/trees/occlusion.h b/cc/trees/occlusion.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..21c3e8a5568f3c0cfccd3982807a58dbae071654 |
| --- /dev/null |
| +++ b/cc/trees/occlusion.h |
| @@ -0,0 +1,41 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CC_TREES_OCCLUSION_H_ |
| +#define CC_TREES_OCCLUSION_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "cc/base/cc_export.h" |
| +#include "cc/base/simple_enclosed_region.h" |
| +#include "ui/gfx/rect.h" |
|
danakj
2014/09/09 22:11:59
nit: can forward declare this
vmpstr
2014/09/10 00:32:24
Done.
|
| +#include "ui/gfx/transform.h" |
| + |
| +namespace cc { |
| +class LayerImpl; |
| +class Layer; |
| +template <typename LayerType> |
| +class OcclusionTracker; |
| + |
| +class CC_EXPORT Occlusion { |
| + public: |
| + Occlusion(); |
| + |
| + bool IsOccluded(const gfx::Rect& content_rect) const; |
| + |
| + private: |
| + friend class OcclusionTracker<Layer>; |
| + friend class OcclusionTracker<LayerImpl>; |
| + |
| + Occlusion(const gfx::Transform& draw_transform, |
|
danakj
2014/09/09 22:11:59
Mildly prefer making this public and remove friend
vmpstr
2014/09/10 00:32:24
Done.
|
| + const SimpleEnclosedRegion& occlusion_from_outside_target, |
| + const SimpleEnclosedRegion& occlusion_from_inside_target); |
| + |
| + gfx::Transform draw_transform_; |
| + SimpleEnclosedRegion occlusion_from_outside_target_; |
| + SimpleEnclosedRegion occlusion_from_inside_target_; |
| +}; |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_TREES_OCCLUSION_H_ |