| 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 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2603 GLuint program, | 2603 GLuint program, |
| 2604 GLint location, | 2604 GLint location, |
| 2605 const char* name) { | 2605 const char* name) { |
| 2606 glBindUniformLocationCHROMIUM(GetProgramServiceID(program, resources_), | 2606 glBindUniformLocationCHROMIUM(GetProgramServiceID(program, resources_), |
| 2607 location, name); | 2607 location, name); |
| 2608 return error::kNoError; | 2608 return error::kNoError; |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( | 2611 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( |
| 2612 GLenum target, | 2612 GLenum target, |
| 2613 GLint imageId) { | 2613 GLint imageId, |
| 2614 GLint fenceId) { |
| 2614 // TODO(geofflang): error handling | 2615 // TODO(geofflang): error handling |
| 2615 gl::GLImage* image = image_manager_->LookupImage(imageId); | 2616 gl::GLImage* image = image_manager_->LookupImage(imageId); |
| 2616 if (!image->BindTexImage(target)) { | 2617 gl::GLFence* fence = nullptr; |
| 2618 if (fenceId) |
| 2619 fence = fence_manager_->LookupFence(fenceId); |
| 2620 if (!image->BindTexImage(target, fence)) { |
| 2617 image->CopyTexImage(target); | 2621 image->CopyTexImage(target); |
| 2618 } | 2622 } |
| 2619 return error::kNoError; | 2623 return error::kNoError; |
| 2620 } | 2624 } |
| 2621 | 2625 |
| 2622 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( | 2626 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( |
| 2623 GLenum target, | 2627 GLenum target, |
| 2624 GLint imageId) { | 2628 GLint imageId) { |
| 2625 // TODO(geofflang): error handling | 2629 // TODO(geofflang): error handling |
| 2626 gl::GLImage* image = image_manager_->LookupImage(imageId); | 2630 gl::GLImage* image = image_manager_->LookupImage(imageId); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( | 3027 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( |
| 3024 GLint location, | 3028 GLint location, |
| 3025 GLboolean transpose, | 3029 GLboolean transpose, |
| 3026 const volatile GLfloat* defaultValue) { | 3030 const volatile GLfloat* defaultValue) { |
| 3027 NOTIMPLEMENTED(); | 3031 NOTIMPLEMENTED(); |
| 3028 return error::kNoError; | 3032 return error::kNoError; |
| 3029 } | 3033 } |
| 3030 | 3034 |
| 3031 } // namespace gles2 | 3035 } // namespace gles2 |
| 3032 } // namespace gpu | 3036 } // namespace gpu |
| OLD | NEW |