Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: cc/test/test_context_support.h

Issue 2257533006: Free worker context resources on idle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-cleanup2
Patch Set: fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <set> 10 #include <set>
(...skipping 13 matching lines...) Expand all
24 class TestContextSupport : public gpu::ContextSupport { 24 class TestContextSupport : public gpu::ContextSupport {
25 public: 25 public:
26 TestContextSupport(); 26 TestContextSupport();
27 ~TestContextSupport() override; 27 ~TestContextSupport() override;
28 28
29 // gpu::ContextSupport implementation. 29 // gpu::ContextSupport implementation.
30 void SignalSyncToken(const gpu::SyncToken& sync_token, 30 void SignalSyncToken(const gpu::SyncToken& sync_token,
31 const base::Closure& callback) override; 31 const base::Closure& callback) override;
32 void SignalQuery(uint32_t query, const base::Closure& callback) override; 32 void SignalQuery(uint32_t query, const base::Closure& callback) override;
33 void SetAggressivelyFreeResources(bool aggressively_free_resources) override; 33 void SetAggressivelyFreeResources(bool aggressively_free_resources) override;
34 void TrimResources() override;
34 void Swap() override; 35 void Swap() override;
35 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; 36 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
36 void CommitOverlayPlanes() override; 37 void CommitOverlayPlanes() override;
37 void ScheduleOverlayPlane(int plane_z_order, 38 void ScheduleOverlayPlane(int plane_z_order,
38 gfx::OverlayTransform plane_transform, 39 gfx::OverlayTransform plane_transform,
39 unsigned overlay_texture_id, 40 unsigned overlay_texture_id,
40 const gfx::Rect& display_bounds, 41 const gfx::Rect& display_bounds,
41 const gfx::RectF& uv_rect) override; 42 const gfx::RectF& uv_rect) override;
42 uint64_t ShareGroupTracingGUID() const override; 43 uint64_t ShareGroupTracingGUID() const override;
43 void SetErrorMessageCallback( 44 void SetErrorMessageCallback(
44 const base::Callback<void(const char*, int32_t)>& callback) override; 45 const base::Callback<void(const char*, int32_t)>& callback) override;
45 std::unique_ptr<ScopedVisibility> ClientBecameVisible() override; 46 std::unique_ptr<ScopedVisibility> ClientBecameVisible() override;
46 void ClientBecameNotVisible( 47 void ClientBecameNotVisible(
47 std::unique_ptr<ScopedVisibility> visibility) override; 48 std::unique_ptr<ScopedVisibility> visibility) override;
48 bool AnyClientsVisible() const override; 49 bool AnyClientsVisible() const override;
49 50
51 std::unique_ptr<ScopedBusy> ClientBecameBusy() override;
52 void ClientBecameNotBusy(std::unique_ptr<ScopedBusy> busy) override;
53 void SetIdleCallback(const base::Closure& callback,
54 scoped_refptr<base::SingleThreadTaskRunner>
55 callback_task_runner) override;
56
50 void CallAllSyncPointCallbacks(); 57 void CallAllSyncPointCallbacks();
51 58
52 typedef base::Callback<void(int plane_z_order, 59 typedef base::Callback<void(int plane_z_order,
53 gfx::OverlayTransform plane_transform, 60 gfx::OverlayTransform plane_transform,
54 unsigned overlay_texture_id, 61 unsigned overlay_texture_id,
55 const gfx::Rect& display_bounds, 62 const gfx::Rect& display_bounds,
56 const gfx::RectF& crop_rect)> 63 const gfx::RectF& crop_rect)>
57 ScheduleOverlayPlaneCallback; 64 ScheduleOverlayPlaneCallback;
58 void SetScheduleOverlayPlaneCallback( 65 void SetScheduleOverlayPlaneCallback(
59 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); 66 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback);
(...skipping 11 matching lines...) Expand all
71 uint32_t num_visible_clients_ = 0; 78 uint32_t num_visible_clients_ = 0;
72 79
73 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; 80 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_;
74 81
75 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); 82 DISALLOW_COPY_AND_ASSIGN(TestContextSupport);
76 }; 83 };
77 84
78 } // namespace cc 85 } // namespace cc
79 86
80 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ 87 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698