OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_CONTEXT_SUPPORT_H_ | 5 #ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_ | 6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "gpu/command_buffer/client/context_support.h" | 14 #include "gpu/command_buffer/client/context_support.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Rect; | 17 class Rect; |
18 class RectF; | 18 class RectF; |
19 } | 19 } |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 | 22 |
23 class TestContextSupport : public gpu::ContextSupport { | 23 class TestContextSupport : public gpu::ContextSupport { |
24 public: | 24 public: |
25 TestContextSupport(); | 25 TestContextSupport(); |
26 ~TestContextSupport() override; | 26 ~TestContextSupport() override; |
27 | 27 |
28 // gpu::ContextSupport implementation. | 28 // gpu::ContextSupport implementation. |
29 void SignalSyncPoint(uint32_t sync_point, | |
30 const base::Closure& callback) override; | |
31 void SignalSyncToken(const gpu::SyncToken& sync_token, | 29 void SignalSyncToken(const gpu::SyncToken& sync_token, |
32 const base::Closure& callback) override; | 30 const base::Closure& callback) override; |
33 void SignalQuery(uint32_t query, const base::Closure& callback) override; | 31 void SignalQuery(uint32_t query, const base::Closure& callback) override; |
34 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; | 32 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; |
35 void Swap() override; | 33 void Swap() override; |
36 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; | 34 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; |
37 void CommitOverlayPlanes() override; | 35 void CommitOverlayPlanes() override; |
38 uint32_t InsertFutureSyncPointCHROMIUM() override; | |
39 void RetireSyncPointCHROMIUM(uint32_t sync_point) override; | |
40 void ScheduleOverlayPlane(int plane_z_order, | 36 void ScheduleOverlayPlane(int plane_z_order, |
41 gfx::OverlayTransform plane_transform, | 37 gfx::OverlayTransform plane_transform, |
42 unsigned overlay_texture_id, | 38 unsigned overlay_texture_id, |
43 const gfx::Rect& display_bounds, | 39 const gfx::Rect& display_bounds, |
44 const gfx::RectF& uv_rect) override; | 40 const gfx::RectF& uv_rect) override; |
45 uint64_t ShareGroupTracingGUID() const override; | 41 uint64_t ShareGroupTracingGUID() const override; |
46 | 42 |
47 void CallAllSyncPointCallbacks(); | 43 void CallAllSyncPointCallbacks(); |
48 | 44 |
49 typedef base::Callback<void(int plane_z_order, | 45 typedef base::Callback<void(int plane_z_order, |
(...skipping 17 matching lines...) Expand all Loading... |
67 bool out_of_order_callbacks_; | 63 bool out_of_order_callbacks_; |
68 | 64 |
69 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; | 65 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; |
70 | 66 |
71 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); | 67 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); |
72 }; | 68 }; |
73 | 69 |
74 } // namespace cc | 70 } // namespace cc |
75 | 71 |
76 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ | 72 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ |
OLD | NEW |