| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_passthrough.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h" |
| 6 | 6 |
| 7 namespace gpu { | 7 namespace gpu { |
| 8 namespace gles2 { | 8 namespace gles2 { |
| 9 | 9 |
| 10 // Custom Handlers | 10 // Custom Handlers |
| (...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2597 GLenum format = static_cast<GLenum>(c.format); | 2597 GLenum format = static_cast<GLenum>(c.format); |
| 2598 GLsizei image_size = static_cast<GLsizei>(c.imageSize); | 2598 GLsizei image_size = static_cast<GLsizei>(c.imageSize); |
| 2599 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case. | 2599 // TODO(geofflang): Handle PIXEL_UNPACK_BUFFER case. |
| 2600 const void* data = GetSharedMemoryAs<const void*>( | 2600 const void* data = GetSharedMemoryAs<const void*>( |
| 2601 c.data_shm_id, c.data_shm_offset, image_size); | 2601 c.data_shm_id, c.data_shm_offset, image_size); |
| 2602 return DoCompressedTexSubImage3D( | 2602 return DoCompressedTexSubImage3D( |
| 2603 target, level, xoffset, yoffset, zoffset, width, height, depth, | 2603 target, level, xoffset, yoffset, zoffset, width, height, depth, |
| 2604 format, image_size, data); | 2604 format, image_size, data); |
| 2605 } | 2605 } |
| 2606 | 2606 |
| 2607 error::Error GLES2DecoderPassthroughImpl::HandleLineWidth( |
| 2608 uint32_t immediate_data_size, |
| 2609 const volatile void* cmd_data) { |
| 2610 const volatile gles2::cmds::LineWidth& c = |
| 2611 *static_cast<const volatile gles2::cmds::LineWidth*>(cmd_data); |
| 2612 GLfloat width = static_cast<GLfloat>(c.width); |
| 2613 error::Error error = DoLineWidth(width); |
| 2614 if (error != error::kNoError) { |
| 2615 return error; |
| 2616 } |
| 2617 return error::kNoError; |
| 2618 } |
| 2619 |
| 2607 } // namespace gles2 | 2620 } // namespace gles2 |
| 2608 } // namespace gpu | 2621 } // namespace gpu |
| OLD | NEW |