OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 virtual void RestoreFramebufferBindings() const OVERRIDE; | 620 virtual void RestoreFramebufferBindings() const OVERRIDE; |
621 virtual void RestoreTextureState(unsigned service_id) const OVERRIDE; | 621 virtual void RestoreTextureState(unsigned service_id) const OVERRIDE; |
622 | 622 |
623 virtual QueryManager* GetQueryManager() OVERRIDE { | 623 virtual QueryManager* GetQueryManager() OVERRIDE { |
624 return query_manager_.get(); | 624 return query_manager_.get(); |
625 } | 625 } |
626 virtual VertexArrayManager* GetVertexArrayManager() OVERRIDE { | 626 virtual VertexArrayManager* GetVertexArrayManager() OVERRIDE { |
627 return vertex_array_manager_.get(); | 627 return vertex_array_manager_.get(); |
628 } | 628 } |
629 virtual bool ProcessPendingQueries() OVERRIDE; | 629 virtual bool ProcessPendingQueries() OVERRIDE; |
630 virtual bool HasMoreIdleWork() OVERRIDE; | |
631 virtual void PerformIdleWork() OVERRIDE; | |
630 | 632 |
631 virtual void SetResizeCallback( | 633 virtual void SetResizeCallback( |
632 const base::Callback<void(gfx::Size)>& callback) OVERRIDE; | 634 const base::Callback<void(gfx::Size)>& callback) OVERRIDE; |
633 | 635 |
634 virtual void SetMsgCallback(const MsgCallback& callback) OVERRIDE; | 636 virtual void SetMsgCallback(const MsgCallback& callback) OVERRIDE; |
635 virtual void SetShaderCacheCallback( | 637 virtual void SetShaderCacheCallback( |
636 const ShaderCacheCallback& callback) OVERRIDE; | 638 const ShaderCacheCallback& callback) OVERRIDE; |
637 virtual void SetWaitSyncPointCallback( | 639 virtual void SetWaitSyncPointCallback( |
638 const WaitSyncPointCallback& callback) OVERRIDE; | 640 const WaitSyncPointCallback& callback) OVERRIDE; |
639 | 641 |
(...skipping 8598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9238 bool GLES2DecoderImpl::ProcessPendingQueries() { | 9240 bool GLES2DecoderImpl::ProcessPendingQueries() { |
9239 if (query_manager_.get() == NULL) { | 9241 if (query_manager_.get() == NULL) { |
9240 return false; | 9242 return false; |
9241 } | 9243 } |
9242 if (!query_manager_->ProcessPendingQueries()) { | 9244 if (!query_manager_->ProcessPendingQueries()) { |
9243 current_decoder_error_ = error::kOutOfBounds; | 9245 current_decoder_error_ = error::kOutOfBounds; |
9244 } | 9246 } |
9245 return query_manager_->HavePendingQueries(); | 9247 return query_manager_->HavePendingQueries(); |
9246 } | 9248 } |
9247 | 9249 |
9250 bool GLES2DecoderImpl::HasMoreIdleWork() { | |
9251 return async_pixel_transfer_delegate_->NeedsProcessMorePendingTransfers(); | |
9252 } | |
9253 | |
9254 void GLES2DecoderImpl::PerformIdleWork() { | |
9255 if (!async_pixel_transfer_delegate_->NeedsProcessMorePendingTransfers()) | |
9256 return; | |
9257 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
| |
9258 RestoreCurrentTexture2DBindings(); | |
9259 ProcessFinishedAsyncTransfers(); | |
9260 } | |
9261 | |
9248 error::Error GLES2DecoderImpl::HandleBeginQueryEXT( | 9262 error::Error GLES2DecoderImpl::HandleBeginQueryEXT( |
9249 uint32 immediate_data_size, const cmds::BeginQueryEXT& c) { | 9263 uint32 immediate_data_size, const cmds::BeginQueryEXT& c) { |
9250 GLenum target = static_cast<GLenum>(c.target); | 9264 GLenum target = static_cast<GLenum>(c.target); |
9251 GLuint client_id = static_cast<GLuint>(c.id); | 9265 GLuint client_id = static_cast<GLuint>(c.id); |
9252 int32 sync_shm_id = static_cast<int32>(c.sync_data_shm_id); | 9266 int32 sync_shm_id = static_cast<int32>(c.sync_data_shm_id); |
9253 uint32 sync_shm_offset = static_cast<uint32>(c.sync_data_shm_offset); | 9267 uint32 sync_shm_offset = static_cast<uint32>(c.sync_data_shm_offset); |
9254 | 9268 |
9255 switch (target) { | 9269 switch (target) { |
9256 case GL_COMMANDS_ISSUED_CHROMIUM: | 9270 case GL_COMMANDS_ISSUED_CHROMIUM: |
9257 case GL_LATENCY_QUERY_CHROMIUM: | 9271 case GL_LATENCY_QUERY_CHROMIUM: |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10353 return error::kNoError; | 10367 return error::kNoError; |
10354 } | 10368 } |
10355 | 10369 |
10356 // Include the auto-generated part of this file. We split this because it means | 10370 // Include the auto-generated part of this file. We split this because it means |
10357 // we can easily edit the non-auto generated parts right here in this file | 10371 // we can easily edit the non-auto generated parts right here in this file |
10358 // instead of having to edit some template or the code generator. | 10372 // instead of having to edit some template or the code generator. |
10359 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10373 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10360 | 10374 |
10361 } // namespace gles2 | 10375 } // namespace gles2 |
10362 } // namespace gpu | 10376 } // namespace gpu |
OLD | NEW |