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_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ | 5 #ifndef CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ |
6 #define CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ | 6 #define CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ |
7 | 7 |
| 8 #include <vector> |
| 9 |
8 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
9 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
10 #include "cc/base/scoped_ptr_vector.h" | |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
14 } | 15 } |
15 | 16 |
16 namespace gpu { | 17 namespace gpu { |
17 struct SyncToken; | 18 struct SyncToken; |
18 } | 19 } |
19 | 20 |
20 namespace cc { | 21 namespace cc { |
(...skipping 20 matching lines...) Expand all Loading... |
41 unsigned texture_id); | 42 unsigned texture_id); |
42 | 43 |
43 private: | 44 private: |
44 // Runs the |impl_callback| to delete the texture and removes the callback | 45 // Runs the |impl_callback| to delete the texture and removes the callback |
45 // from the |impl_callbacks_| list. | 46 // from the |impl_callbacks_| list. |
46 void RunDeleteTextureOnImplThread(SingleReleaseCallback* impl_callback, | 47 void RunDeleteTextureOnImplThread(SingleReleaseCallback* impl_callback, |
47 const gpu::SyncToken& sync_token, | 48 const gpu::SyncToken& sync_token, |
48 bool is_lost); | 49 bool is_lost); |
49 | 50 |
50 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; | 51 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; |
51 ScopedPtrVector<SingleReleaseCallback> impl_callbacks_; | 52 std::vector<scoped_ptr<SingleReleaseCallback>> impl_callbacks_; |
52 base::WeakPtrFactory<TextureMailboxDeleter> weak_ptr_factory_; | 53 base::WeakPtrFactory<TextureMailboxDeleter> weak_ptr_factory_; |
53 }; | 54 }; |
54 | 55 |
55 } // namespace cc | 56 } // namespace cc |
56 | 57 |
57 #endif // CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ | 58 #endif // CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ |
OLD | NEW |