| 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 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 | 8 |
| 9 namespace gpu { | 9 namespace gpu { |
| 10 namespace gles2 { | 10 namespace gles2 { |
| (...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2587 error::Error GLES2DecoderPassthroughImpl::DoGetUniformsES3CHROMIUM( | 2587 error::Error GLES2DecoderPassthroughImpl::DoGetUniformsES3CHROMIUM( |
| 2588 GLuint program, | 2588 GLuint program, |
| 2589 std::vector<uint8_t>* data) { | 2589 std::vector<uint8_t>* data) { |
| 2590 NOTIMPLEMENTED(); | 2590 NOTIMPLEMENTED(); |
| 2591 return error::kNoError; | 2591 return error::kNoError; |
| 2592 } | 2592 } |
| 2593 | 2593 |
| 2594 error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE( | 2594 error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE( |
| 2595 GLuint shader, | 2595 GLuint shader, |
| 2596 std::string* source) { | 2596 std::string* source) { |
| 2597 NOTIMPLEMENTED(); | 2597 FlushErrors(); |
| 2598 GLuint service_id = GetShaderServiceID(shader, resources_); |
| 2599 GLint translated_source_length = 0; |
| 2600 glGetShaderiv(service_id, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, |
| 2601 &translated_source_length); |
| 2602 if (FlushErrors()) { |
| 2603 return error::kNoError; |
| 2604 } |
| 2605 |
| 2606 if (translated_source_length > 0) { |
| 2607 std::vector<char> buffer(translated_source_length, 0); |
| 2608 glGetTranslatedShaderSourceANGLE(service_id, translated_source_length, |
| 2609 nullptr, buffer.data()); |
| 2610 *source = std::string(buffer.data()); |
| 2611 } |
| 2598 return error::kNoError; | 2612 return error::kNoError; |
| 2599 } | 2613 } |
| 2600 | 2614 |
| 2601 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( | 2615 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( |
| 2602 GLint x, | 2616 GLint x, |
| 2603 GLint y, | 2617 GLint y, |
| 2604 GLint width, | 2618 GLint width, |
| 2605 GLint height) { | 2619 GLint height) { |
| 2606 gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height); | 2620 gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height); |
| 2607 if (result == gfx::SwapResult::SWAP_FAILED) { | 2621 if (result == gfx::SwapResult::SWAP_FAILED) { |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3235 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( | 3249 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( |
| 3236 GLint location, | 3250 GLint location, |
| 3237 GLboolean transpose, | 3251 GLboolean transpose, |
| 3238 const volatile GLfloat* defaultValue) { | 3252 const volatile GLfloat* defaultValue) { |
| 3239 NOTIMPLEMENTED(); | 3253 NOTIMPLEMENTED(); |
| 3240 return error::kNoError; | 3254 return error::kNoError; |
| 3241 } | 3255 } |
| 3242 | 3256 |
| 3243 } // namespace gles2 | 3257 } // namespace gles2 |
| 3244 } // namespace gpu | 3258 } // namespace gpu |
| OLD | NEW |