Chromium Code Reviews| 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 805cd70a0838bd2f0dc35f069bb52d0c98cd2c8d..64ad1510d47be980edc0b3edcd7f71bdeefa9625 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -667,9 +667,10 @@ class GLES2DecoderImpl : public GLES2Decoder, |
| return valuebuffer_manager(); |
| } |
| - bool ProcessPendingQueries(bool did_finish) override; |
| + bool HasPendingQueries() const override; |
| + void ProcessPendingQueries(bool did_finish) override; |
| - bool HasMoreIdleWork() override; |
| + bool HasMoreIdleWork() const override; |
| void PerformIdleWork() override; |
| void WaitForReadPixels(base::Closure callback) override; |
| @@ -11891,14 +11892,15 @@ void GLES2DecoderImpl::DeleteQueriesEXTHelper( |
| } |
| } |
| -bool GLES2DecoderImpl::ProcessPendingQueries(bool did_finish) { |
| - if (query_manager_.get() == NULL) { |
| - return false; |
| - } |
| - if (!query_manager_->ProcessPendingQueries(did_finish)) { |
| +bool GLES2DecoderImpl::HasPendingQueries() const { |
| + return query_manager_.get() && query_manager_->HavePendingQueries(); |
| +} |
| + |
| +void GLES2DecoderImpl::ProcessPendingQueries(bool did_finish) { |
| + if (!query_manager_.get()) |
|
dshwang
2015/09/01 08:56:10
if (!HasPendingQueries())
reveman
2015/09/01 15:54:11
It's up to the caller to do that check if needed.
|
| + return; |
| + if (!query_manager_->ProcessPendingQueries(did_finish)) |
| current_decoder_error_ = error::kOutOfBounds; |
| - } |
| - return query_manager_->HavePendingQueries(); |
| } |
| // Note that if there are no pending readpixels right now, |
| @@ -11927,7 +11929,7 @@ void GLES2DecoderImpl::ProcessPendingReadPixels(bool did_finish) { |
| } |
| } |
| -bool GLES2DecoderImpl::HasMoreIdleWork() { |
| +bool GLES2DecoderImpl::HasMoreIdleWork() const { |
| return !pending_readpixel_fences_.empty() || |
| gpu_tracer_->HasTracesToProcess(); |
| } |