OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_TEST_MOCK_OCCLUSION_TRACKER_H_ | 5 #ifndef CC_TEST_MOCK_OCCLUSION_TRACKER_H_ |
6 #define CC_TEST_MOCK_OCCLUSION_TRACKER_H_ | 6 #define CC_TEST_MOCK_OCCLUSION_TRACKER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "cc/trees/occlusion_tracker.h" | 9 #include "cc/trees/occlusion_tracker.h" |
9 | 10 |
10 namespace cc { | 11 namespace cc { |
11 | 12 |
12 class MockOcclusionTracker : public OcclusionTracker { | 13 class MockOcclusionTracker : public OcclusionTracker { |
13 // This class is used for testing only. It fakes just enough information to | 14 // This class is used for testing only. It fakes just enough information to |
14 // calculate unoccluded content rect and unoccluded contributing surface | 15 // calculate unoccluded content rect and unoccluded contributing surface |
15 // content rect. It calls the helper function of occlusion tracker to avoid | 16 // content rect. It calls the helper function of occlusion tracker to avoid |
16 // DCHECKs since testing environment won't be set up properly to pass those. | 17 // DCHECKs since testing environment won't be set up properly to pass those. |
17 public: | 18 public: |
(...skipping 20 matching lines...) Expand all Loading... |
38 .occlusion_from_inside_target = occluded; | 39 .occlusion_from_inside_target = occluded; |
39 } | 40 } |
40 | 41 |
41 private: | 42 private: |
42 DISALLOW_COPY_AND_ASSIGN(MockOcclusionTracker); | 43 DISALLOW_COPY_AND_ASSIGN(MockOcclusionTracker); |
43 }; | 44 }; |
44 | 45 |
45 } // namespace cc | 46 } // namespace cc |
46 | 47 |
47 #endif // CC_TEST_MOCK_OCCLUSION_TRACKER_H_ | 48 #endif // CC_TEST_MOCK_OCCLUSION_TRACKER_H_ |
OLD | NEW |