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

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: remove texture_dirty_ state from AsyncPixelTransferDelegateIdle 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 1d642fd1d16cc08c26481deb1f9100971493ddb9..ba7cac8060db2f2c66eade46afccab75b383a1bb 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -627,6 +627,8 @@ class GLES2DecoderImpl : public GLES2Decoder {
return vertex_array_manager_.get();
}
virtual bool ProcessPendingQueries() OVERRIDE;
+ virtual bool HasMoreIdleWork() OVERRIDE;
+ virtual void PerformIdleWork() OVERRIDE;
virtual void SetResizeCallback(
const base::Callback<void(gfx::Size)>& callback) OVERRIDE;
@@ -9245,6 +9247,18 @@ bool GLES2DecoderImpl::ProcessPendingQueries() {
return query_manager_->HavePendingQueries();
}
+bool GLES2DecoderImpl::HasMoreIdleWork() {
+ return async_pixel_transfer_delegate_->NeedsProcessMorePendingTransfers();
+}
+
+void GLES2DecoderImpl::PerformIdleWork() {
+ if (!async_pixel_transfer_delegate_->NeedsProcessMorePendingTransfers())
+ return;
+ if (async_pixel_transfer_delegate_->ProcessMorePendingTransfers())
greggman 2013/03/14 18:15:46 I think I asked this in another CL. Would it be be
epenner 2013/03/14 18:23:24 It's currently a layering violation to do that, bu
reveman 2013/03/14 19:21:47 Oh sorry, so we've gone back and forth here withou
+ RestoreCurrentTexture2DBindings();
+ ProcessFinishedAsyncTransfers();
+}
+
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