| 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 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 GLuint program, | 2645 GLuint program, |
| 2646 GLint location, | 2646 GLint location, |
| 2647 const char* name) { | 2647 const char* name) { |
| 2648 glBindUniformLocationCHROMIUM(GetProgramServiceID(program, resources_), | 2648 glBindUniformLocationCHROMIUM(GetProgramServiceID(program, resources_), |
| 2649 location, name); | 2649 location, name); |
| 2650 return error::kNoError; | 2650 return error::kNoError; |
| 2651 } | 2651 } |
| 2652 | 2652 |
| 2653 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( | 2653 error::Error GLES2DecoderPassthroughImpl::DoBindTexImage2DCHROMIUM( |
| 2654 GLenum target, | 2654 GLenum target, |
| 2655 GLint imageId) { | 2655 GLint imageId, |
| 2656 GLint fenceId) { |
| 2656 // TODO(geofflang): error handling | 2657 // TODO(geofflang): error handling |
| 2657 gl::GLImage* image = image_manager_->LookupImage(imageId); | 2658 gl::GLImage* image = image_manager_->LookupImage(imageId); |
| 2658 if (!image->BindTexImage(target)) { | 2659 gl::GLFence* fence = nullptr; |
| 2660 if (fenceId) |
| 2661 fence = fence_manager_->LookupFence(fenceId); |
| 2662 if (!image->BindTexImage(target, fence)) { |
| 2659 image->CopyTexImage(target); | 2663 image->CopyTexImage(target); |
| 2660 } | 2664 } |
| 2661 return error::kNoError; | 2665 return error::kNoError; |
| 2662 } | 2666 } |
| 2663 | 2667 |
| 2664 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( | 2668 error::Error GLES2DecoderPassthroughImpl::DoReleaseTexImage2DCHROMIUM( |
| 2665 GLenum target, | 2669 GLenum target, |
| 2666 GLint imageId) { | 2670 GLint imageId) { |
| 2667 // TODO(geofflang): error handling | 2671 // TODO(geofflang): error handling |
| 2668 gl::GLImage* image = image_manager_->LookupImage(imageId); | 2672 gl::GLImage* image = image_manager_->LookupImage(imageId); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( | 3069 GLES2DecoderPassthroughImpl::DoUniformMatrix4fvStreamTextureMatrixCHROMIUM( |
| 3066 GLint location, | 3070 GLint location, |
| 3067 GLboolean transpose, | 3071 GLboolean transpose, |
| 3068 const volatile GLfloat* defaultValue) { | 3072 const volatile GLfloat* defaultValue) { |
| 3069 NOTIMPLEMENTED(); | 3073 NOTIMPLEMENTED(); |
| 3070 return error::kNoError; | 3074 return error::kNoError; |
| 3071 } | 3075 } |
| 3072 | 3076 |
| 3073 } // namespace gles2 | 3077 } // namespace gles2 |
| 3074 } // namespace gpu | 3078 } // namespace gpu |
| OLD | NEW |