Chromium Code Reviews| Index: cc/trees/occlusion_checker.h |
| diff --git a/cc/trees/occlusion_checker.h b/cc/trees/occlusion_checker.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c4b809f23d75ae4884d9ba0f383812ce5d2380e6 |
| --- /dev/null |
| +++ b/cc/trees/occlusion_checker.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_CHECKER_H_ |
| +#define CC_TREES_OCCLUSION_CHECKER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "cc/base/cc_export.h" |
| +#include "cc/base/simple_enclosed_region.h" |
| +#include "ui/gfx/rect.h" |
| +#include "ui/gfx/transform.h" |
| + |
| +namespace cc { |
| +class LayerImpl; |
| +class Layer; |
| + |
| +template <typename LayerType> |
| +class CC_EXPORT OcclusionChecker { |
| + public: |
| + OcclusionChecker(); |
| + OcclusionChecker(const gfx::Transform& draw_transform, |
| + const SimpleEnclosedRegion& occlusion_from_outside_target, |
| + const SimpleEnclosedRegion& occlusion_from_inside_target); |
| + |
| + bool Occluded(const gfx::Rect& content_rect); |
| + |
| + private: |
| + gfx::Transform draw_transform_; |
|
danakj
2014/09/05 19:31:29
This could really be part of the query, the rect +
vmpstr
2014/09/05 21:00:06
I kind of prefer to have the occlusion checker fix
|
| + SimpleEnclosedRegion occlusion_from_outside_target_; |
| + SimpleEnclosedRegion occlusion_from_inside_target_; |
| +}; |
| + |
| +#if !defined(COMPILER_MSVC) |
| +extern template class OcclusionChecker<Layer>; |
| +extern template class OcclusionChecker<LayerImpl>; |
| +#endif |
| + |
| +} // namespace cc |
| + |
| +#endif // CC_TREES_OCCLUSION_CHECKER_H_ |