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 9728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9739 uint32 immediate_data_size, | 9739 uint32 immediate_data_size, |
9740 const void* cmd_data) { | 9740 const void* cmd_data) { |
9741 return error::kUnknownCommand; | 9741 return error::kUnknownCommand; |
9742 } | 9742 } |
9743 | 9743 |
9744 error::Error GLES2DecoderImpl::HandleWaitSyncPointCHROMIUM( | 9744 error::Error GLES2DecoderImpl::HandleWaitSyncPointCHROMIUM( |
9745 uint32 immediate_data_size, | 9745 uint32 immediate_data_size, |
9746 const void* cmd_data) { | 9746 const void* cmd_data) { |
9747 const gles2::cmds::WaitSyncPointCHROMIUM& c = | 9747 const gles2::cmds::WaitSyncPointCHROMIUM& c = |
9748 *static_cast<const gles2::cmds::WaitSyncPointCHROMIUM*>(cmd_data); | 9748 *static_cast<const gles2::cmds::WaitSyncPointCHROMIUM*>(cmd_data); |
9749 group_->mailbox_manager()->PullTextureUpdates(); | 9749 uint32 sync_point = c.sync_point; |
9750 if (wait_sync_point_callback_.is_null()) | 9750 if (wait_sync_point_callback_.is_null()) |
9751 return error::kNoError; | 9751 return error::kNoError; |
9752 | 9752 |
9753 return wait_sync_point_callback_.Run(c.sync_point) ? | 9753 return wait_sync_point_callback_.Run(sync_point) ? |
9754 error::kNoError : error::kDeferCommandUntilLater; | 9754 error::kNoError : error::kDeferCommandUntilLater; |
9755 } | 9755 } |
9756 | 9756 |
9757 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM( | 9757 error::Error GLES2DecoderImpl::HandleDiscardBackbufferCHROMIUM( |
9758 uint32 immediate_data_size, | 9758 uint32 immediate_data_size, |
9759 const void* cmd_data) { | 9759 const void* cmd_data) { |
9760 if (surface_->DeferDraws()) | 9760 if (surface_->DeferDraws()) |
9761 return error::kDeferCommandUntilLater; | 9761 return error::kDeferCommandUntilLater; |
9762 if (!surface_->SetBackbufferAllocation(false)) | 9762 if (!surface_->SetBackbufferAllocation(false)) |
9763 return error::kLostContext; | 9763 return error::kLostContext; |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11228 } | 11228 } |
11229 } | 11229 } |
11230 | 11230 |
11231 // Include the auto-generated part of this file. We split this because it means | 11231 // Include the auto-generated part of this file. We split this because it means |
11232 // we can easily edit the non-auto generated parts right here in this file | 11232 // we can easily edit the non-auto generated parts right here in this file |
11233 // instead of having to edit some template or the code generator. | 11233 // instead of having to edit some template or the code generator. |
11234 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 11234 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
11235 | 11235 |
11236 } // namespace gles2 | 11236 } // namespace gles2 |
11237 } // namespace gpu | 11237 } // namespace gpu |
OLD | NEW |