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 10139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10150 | 10150 |
10151 gfx::AsyncTexSubImage2DParams tex_params = {target, level, xoffset, yoffset, | 10151 gfx::AsyncTexSubImage2DParams tex_params = {target, level, xoffset, yoffset, |
10152 width, height, format, type}; | 10152 width, height, format, type}; |
10153 gfx::AsyncMemoryParams mem_params = {shared_memory, shm_size, | 10153 gfx::AsyncMemoryParams mem_params = {shared_memory, shm_size, |
10154 shm_data_offset, shm_data_size}; | 10154 shm_data_offset, shm_data_size}; |
10155 async_pixel_transfer_delegate_->AsyncTexSubImage2D( | 10155 async_pixel_transfer_delegate_->AsyncTexSubImage2D( |
10156 info->GetAsyncTransferState(), tex_params, mem_params); | 10156 info->GetAsyncTransferState(), tex_params, mem_params); |
10157 return error::kNoError; | 10157 return error::kNoError; |
10158 } | 10158 } |
10159 | 10159 |
10160 error::Error GLES2DecoderImpl::HandleWaitAsyncTexImage2DCHROMIUM( | |
10161 uint32 immediate_data_size, const cmds::WaitAsyncTexImage2DCHROMIUM& c) { | |
10162 TRACE_EVENT0("gpu", "GLES2DecoderImpl::HandleWaitAsyncTexImage2DCHROMIUM"); | |
10163 GLenum target = static_cast<GLenum>(c.target); | |
10164 | |
10165 if (GL_TEXTURE_2D != target) { | |
10166 SetGLError(GL_INVALID_ENUM, "glWaitAsyncTexImage2DCHROMIUM", "target"); | |
10167 return error::kNoError; | |
10168 } | |
10169 Texture* info = GetTextureInfoForTarget(target); | |
10170 if (!info) { | |
10171 SetGLError(GL_INVALID_OPERATION, | |
10172 "glWaitAsyncTexImage2DCHROMIUM", "unknown texture"); | |
10173 return error::kNoError; | |
10174 } | |
10175 async_pixel_transfer_delegate_->WaitForTransferCompletion( | |
greggman
2013/03/04 21:25:53
Are you sure you want to wait here vs checking if
Sami
2013/03/05 12:25:26
Yeah, we talked about doing this but shied away fo
| |
10176 info->GetAsyncTransferState()); | |
10177 return error::kNoError; | |
10178 } | |
10179 | |
10160 // Include the auto-generated part of this file. We split this because it means | 10180 // Include the auto-generated part of this file. We split this because it means |
10161 // we can easily edit the non-auto generated parts right here in this file | 10181 // we can easily edit the non-auto generated parts right here in this file |
10162 // instead of having to edit some template or the code generator. | 10182 // instead of having to edit some template or the code generator. |
10163 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10183 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10164 | 10184 |
10165 } // namespace gles2 | 10185 } // namespace gles2 |
10166 } // namespace gpu | 10186 } // namespace gpu |
OLD | NEW |