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

Unified Diff: ui/gl/async_pixel_transfer_delegate.h

Issue 12213073: Re-land: Mark async texture uploads as completed from the upload thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/query_manager.cc ('k') | ui/gl/async_pixel_transfer_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/async_pixel_transfer_delegate.h
diff --git a/ui/gl/async_pixel_transfer_delegate.h b/ui/gl/async_pixel_transfer_delegate.h
index d07a77da88ec895ff3e41a2bf75c7cad45b53513..da457225ecdcaebb34eeb4e9de856a14c9c0f5a4 100644
--- a/ui/gl/async_pixel_transfer_delegate.h
+++ b/ui/gl/async_pixel_transfer_delegate.h
@@ -78,6 +78,8 @@ class GL_EXPORT AsyncPixelTransferState :
class GL_EXPORT AsyncPixelTransferDelegate {
public:
+ typedef base::Callback<void(const AsyncMemoryParams&)> CompletionCallback;
+
static scoped_ptr<AsyncPixelTransferDelegate>
Create(gfx::GLContext* context);
virtual ~AsyncPixelTransferDelegate() {}
@@ -89,8 +91,10 @@ class GL_EXPORT AsyncPixelTransferDelegate {
return make_scoped_ptr(CreateRawPixelTransferState(texture_id));
}
+ // There's no guarantee that callback will run on the caller thread.
virtual void AsyncNotifyCompletion(
- const base::Closure& notify_task) = 0;
+ const AsyncMemoryParams& mem_params,
+ const CompletionCallback& callback) = 0;
virtual void AsyncTexImage2D(
AsyncPixelTransferState* state,
« no previous file with comments | « gpu/command_buffer/service/query_manager.cc ('k') | ui/gl/async_pixel_transfer_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698