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 #include "cc/resources/texture_mailbox_deleter.h" | 5 #include "cc/resources/texture_mailbox_deleter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
11 #include "cc/output/context_provider.h" | 11 #include "cc/output/context_provider.h" |
12 #include "cc/resources/single_release_callback.h" | 12 #include "cc/resources/single_release_callback.h" |
13 #include "gpu/command_buffer/client/gles2_interface.h" | 13 #include "gpu/command_buffer/client/gles2_interface.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 static void DeleteTextureOnImplThread( | 17 static void DeleteTextureOnImplThread( |
18 const scoped_refptr<ContextProvider>& context_provider, | 18 const scoped_refptr<ContextProvider>& context_provider, |
19 unsigned texture_id, | 19 unsigned texture_id, |
20 unsigned sync_point, | 20 uint32 sync_point, |
21 bool is_lost) { | 21 bool is_lost) { |
22 if (sync_point) | 22 if (sync_point) |
23 context_provider->ContextGL()->WaitSyncPointCHROMIUM(sync_point); | 23 context_provider->ContextGL()->WaitSyncPointCHROMIUM(sync_point); |
24 context_provider->ContextGL()->DeleteTextures(1, &texture_id); | 24 context_provider->ContextGL()->DeleteTextures(1, &texture_id); |
25 } | 25 } |
26 | 26 |
27 static void PostTaskFromMainToImplThread( | 27 static void PostTaskFromMainToImplThread( |
28 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 28 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
29 ReleaseCallback run_impl_callback, | 29 ReleaseCallback run_impl_callback, |
30 unsigned sync_point, | 30 unsigned sync_point, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 impl_callbacks_.erase(impl_callbacks_.begin() + i); | 83 impl_callbacks_.erase(impl_callbacks_.begin() + i); |
84 return; | 84 return; |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 NOTREACHED() << "The Callback returned by GetDeleteCallback() was called " | 88 NOTREACHED() << "The Callback returned by GetDeleteCallback() was called " |
89 << "more than once."; | 89 << "more than once."; |
90 } | 90 } |
91 | 91 |
92 } // namespace cc | 92 } // namespace cc |
OLD | NEW |