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

Side by Side Diff: cc/resources/texture_mailbox_deleter.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/texture_mailbox_deleter.h ('k') | cc/resources/transferable_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
OLDNEW
« no previous file with comments | « cc/resources/texture_mailbox_deleter.h ('k') | cc/resources/transferable_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698