diff options
Diffstat (limited to 'cc/test/mock_occlusion_tracker.h')
-rw-r--r-- | cc/test/mock_occlusion_tracker.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/cc/test/mock_occlusion_tracker.h b/cc/test/mock_occlusion_tracker.h index 649eb76..b291bf5 100644 --- a/cc/test/mock_occlusion_tracker.h +++ b/cc/test/mock_occlusion_tracker.h @@ -9,36 +9,32 @@ namespace cc { -template <typename LayerType> -class MockOcclusionTracker : public OcclusionTracker<LayerType> { +class MockOcclusionTracker : public OcclusionTracker { // This class is used for testing only. It fakes just enough information to // calculate unoccluded content rect and unoccluded contributing surface // content rect. It calls the helper function of occlusion tracker to avoid // DCHECKs since testing environment won't be set up properly to pass those. public: - MockOcclusionTracker() - : OcclusionTracker<LayerType>(gfx::Rect(0, 0, 1000, 1000)) { - typename OcclusionTracker<LayerType>::StackObject stack_obj; - OcclusionTracker<LayerType>::stack_.push_back(stack_obj); - OcclusionTracker<LayerType>::stack_.push_back(stack_obj); + MockOcclusionTracker() : OcclusionTracker(gfx::Rect(0, 0, 1000, 1000)) { + OcclusionTracker::StackObject stack_obj; + OcclusionTracker::stack_.push_back(stack_obj); + OcclusionTracker::stack_.push_back(stack_obj); } explicit MockOcclusionTracker(const gfx::Rect& screen_scissor_rect) - : OcclusionTracker<LayerType>(screen_scissor_rect) { - typename OcclusionTracker<LayerType>::StackObject stack_obj; - OcclusionTracker<LayerType>::stack_.push_back(stack_obj); - OcclusionTracker<LayerType>::stack_.push_back(stack_obj); + : OcclusionTracker(screen_scissor_rect) { + OcclusionTracker::StackObject stack_obj; + OcclusionTracker::stack_.push_back(stack_obj); + OcclusionTracker::stack_.push_back(stack_obj); } void set_occluded_target_rect(const gfx::Rect& occluded) { - OcclusionTracker<LayerType>::stack_.back().occlusion_from_inside_target = - occluded; + OcclusionTracker::stack_.back().occlusion_from_inside_target = occluded; } void set_occluded_target_rect_for_contributing_surface( const gfx::Rect& occluded) { - OcclusionTracker< - LayerType>::stack_[OcclusionTracker<LayerType>::stack_.size() - 2] + OcclusionTracker::stack_[OcclusionTracker::stack_.size() - 2] .occlusion_from_inside_target = occluded; } |