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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 12040049: gpu: Implement idle async pixel transfers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and prevent starvation 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 8b183c06009e991c2d500ad5871c83b9bf3e7fb6..ea6686c9b9c6f5e4979317b6a2c6d46507229a11 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -572,6 +572,8 @@ class GLES2DecoderImpl : public GLES2Decoder {
return vertex_array_manager_.get();
}
virtual bool ProcessPendingQueries() OVERRIDE;
+ virtual bool HasMoreWork() OVERRIDE;
+ virtual bool PerformIdleWork() OVERRIDE;
virtual void SetResizeCallback(
const base::Callback<void(gfx::Size)>& callback) OVERRIDE;
@@ -9094,6 +9096,17 @@ bool GLES2DecoderImpl::ProcessPendingQueries() {
return query_manager_->HavePendingQueries();
}
+bool GLES2DecoderImpl::HasMoreWork() {
+ return ProcessPendingQueries() ||
+ async_pixel_transfer_delegate_->HasPendingTransfers();
+}
+
+bool GLES2DecoderImpl::PerformIdleWork() {
+ async_pixel_transfer_delegate_->ProcessPendingTransfers();
+ RestoreCurrentTexture2DBindings();
Sami 2013/03/07 16:57:19 Maybe only restore the bindings only if we actuall
reveman 2013/03/07 20:21:04 Done.
+ return async_pixel_transfer_delegate_->HasPendingTransfers();
+}
+
error::Error GLES2DecoderImpl::HandleBeginQueryEXT(
uint32 immediate_data_size, const cmds::BeginQueryEXT& c) {
GLenum target = static_cast<GLenum>(c.target);

Powered by Google App Engine
This is Rietveld 408576698