| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_SURFACE_HITTEST_TEST_HELPERS_H_ | 5 #ifndef CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_ |
| 6 #define CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_ | 6 #define CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "cc/quads/render_pass.h" | 12 #include "cc/quads/render_pass.h" |
| 13 #include "cc/surfaces/surface_factory_client.h" | 13 #include "cc/surfaces/surface_factory_client.h" |
| 14 #include "cc/surfaces/surface_hittest_delegate.h" | 14 #include "cc/surfaces/surface_hittest_delegate.h" |
| 15 #include "ui/gfx/geometry/insets.h" | 15 #include "ui/gfx/geometry/insets.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Transform; | 18 class Transform; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 51 const gfx::Transform& transform, | 51 const gfx::Transform& transform, |
| 52 const gfx::Rect& root_rect, | 52 const gfx::Rect& root_rect, |
| 53 const gfx::Rect& quad_rect, | 53 const gfx::Rect& quad_rect, |
| 54 SurfaceId surface_id); | 54 SurfaceId surface_id); |
| 55 | 55 |
| 56 void CreateRenderPass(const RenderPassId& render_pass_id, | 56 void CreateRenderPass(const RenderPassId& render_pass_id, |
| 57 const gfx::Rect& rect, | 57 const gfx::Rect& rect, |
| 58 const gfx::Transform& transform_to_root_target, | 58 const gfx::Transform& transform_to_root_target, |
| 59 RenderPassList* render_pass_list); | 59 RenderPassList* render_pass_list); |
| 60 | 60 |
| 61 scoped_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( | 61 std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( |
| 62 RenderPassList* render_pass_list); | 62 RenderPassList* render_pass_list); |
| 63 | 63 |
| 64 scoped_ptr<CompositorFrame> CreateCompositorFrame(const gfx::Rect& root_rect, | 64 std::unique_ptr<CompositorFrame> CreateCompositorFrame( |
| 65 RenderPass** render_pass); | 65 const gfx::Rect& root_rect, |
| 66 RenderPass** render_pass); |
| 66 | 67 |
| 67 class TestSurfaceHittestDelegate : public SurfaceHittestDelegate { | 68 class TestSurfaceHittestDelegate : public SurfaceHittestDelegate { |
| 68 public: | 69 public: |
| 69 TestSurfaceHittestDelegate(); | 70 TestSurfaceHittestDelegate(); |
| 70 ~TestSurfaceHittestDelegate(); | 71 ~TestSurfaceHittestDelegate(); |
| 71 | 72 |
| 72 int reject_target_overrides() const { return reject_target_overrides_; } | 73 int reject_target_overrides() const { return reject_target_overrides_; } |
| 73 int accept_target_overrides() const { return accept_target_overrides_; } | 74 int accept_target_overrides() const { return accept_target_overrides_; } |
| 74 | 75 |
| 75 void AddInsetsForRejectSurface(const SurfaceId& surface_id, | 76 void AddInsetsForRejectSurface(const SurfaceId& surface_id, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 89 std::map<SurfaceId, gfx::Insets> insets_for_reject_; | 90 std::map<SurfaceId, gfx::Insets> insets_for_reject_; |
| 90 std::map<SurfaceId, gfx::Insets> insets_for_accept_; | 91 std::map<SurfaceId, gfx::Insets> insets_for_accept_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(TestSurfaceHittestDelegate); | 93 DISALLOW_COPY_AND_ASSIGN(TestSurfaceHittestDelegate); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace test | 96 } // namespace test |
| 96 } // namespace cc | 97 } // namespace cc |
| 97 | 98 |
| 98 #endif // CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_ | 99 #endif // CC_TEST_SURFACE_HITTEST_TEST_HELPERS_H_ |
| OLD | NEW |