OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_RESOURCES_SINGLE_RELEASE_CALLBACK_H_ | |
6 #define CC_RESOURCES_SINGLE_RELEASE_CALLBACK_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "cc/resources/release_callback.h" | |
10 | |
11 namespace cc { | |
12 | |
13 class SingleReleaseCallback { | |
14 public: | |
15 static scoped_ptr<SingleReleaseCallback> Create(const ReleaseCallback& cb) { | |
16 return make_scoped_ptr(new SingleReleaseCallback(cb)); | |
17 } | |
18 | |
19 ~SingleReleaseCallback(); | |
20 | |
21 void Run(uint32 sync_point, bool is_lost); | |
22 | |
23 private: | |
24 explicit SingleReleaseCallback(const ReleaseCallback& callback); | |
25 | |
26 bool has_been_run_; | |
27 ReleaseCallback callback_; | |
28 }; | |
29 | |
30 } // namespace cc | |
31 | |
32 #endif // CC_RESOURCES_SINGLE_RELEASE_CALLBACK_H_ | |
OLD | NEW |