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

Unified Diff: ui/gl/async_pixel_transfer_delegate.h

Issue 12040049: gpu: Implement idle async pixel transfers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECKs to ensure idle async uploads are only used with GL_TEXTURE_2D target Created 7 years, 9 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/gpu_scheduler.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 44bcbcb21ba590abaf5ae4184a948cd98c38af19..3f9f4346e00873a54539c3251f09aa87fcff356d 100644
--- a/ui/gl/async_pixel_transfer_delegate.h
+++ b/ui/gl/async_pixel_transfer_delegate.h
@@ -112,6 +112,16 @@ class GL_EXPORT AsyncPixelTransferDelegate {
virtual uint32 GetTextureUploadCount() = 0;
virtual base::TimeDelta GetTotalTextureUploadTime() = 0;
+ // ProcessMorePendingTransfers() will be called at a good time
+ // to process a small amount of pending transfer work while
+ // NeedsProcessMorePendingTransfers() returns true. Implementations
+ // that can't dispatch work to separate threads should use
+ // this to avoid blocking the caller thread inappropriately.
+ // ProcessMorePendingTransfers() returns true iff a texture was
+ // bound to texture-unit zero.
+ virtual bool ProcessMorePendingTransfers() = 0;
+ virtual bool NeedsProcessMorePendingTransfers() = 0;
+
protected:
AsyncPixelTransferDelegate() {}
// For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD.
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.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