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 #include "ui/gl/gl_version_info.h" | 8 #include "ui/gl/gl_version_info.h" |
9 | 9 |
10 namespace gpu { | 10 namespace gpu { |
(...skipping 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3090 GLuint64 release_count) { | 3090 GLuint64 release_count) { |
3091 if (!fence_sync_release_callback_.is_null()) | 3091 if (!fence_sync_release_callback_.is_null()) |
3092 fence_sync_release_callback_.Run(release_count); | 3092 fence_sync_release_callback_.Run(release_count); |
3093 return error::kNoError; | 3093 return error::kNoError; |
3094 } | 3094 } |
3095 | 3095 |
3096 error::Error GLES2DecoderPassthroughImpl::DoWaitSyncTokenCHROMIUM( | 3096 error::Error GLES2DecoderPassthroughImpl::DoWaitSyncTokenCHROMIUM( |
3097 CommandBufferNamespace namespace_id, | 3097 CommandBufferNamespace namespace_id, |
3098 CommandBufferId command_buffer_id, | 3098 CommandBufferId command_buffer_id, |
3099 GLuint64 release_count) { | 3099 GLuint64 release_count) { |
3100 if (wait_fence_sync_callback_.is_null()) { | 3100 if (wait_sync_token_callback_.is_null()) { |
3101 return error::kNoError; | 3101 return error::kNoError; |
3102 } | 3102 } |
3103 return wait_fence_sync_callback_.Run(namespace_id, command_buffer_id, | 3103 SyncToken sync_token(namespace_id, 0, command_buffer_id, release_count); |
3104 release_count) | 3104 return wait_sync_token_callback_.Run(sync_token) |
3105 ? error::kNoError | 3105 ? error::kDeferCommandUntilLater |
3106 : error::kDeferCommandUntilLater; | 3106 : error::kNoError; |
3107 } | 3107 } |
3108 | 3108 |
3109 error::Error GLES2DecoderPassthroughImpl::DoDrawBuffersEXT( | 3109 error::Error GLES2DecoderPassthroughImpl::DoDrawBuffersEXT( |
3110 GLsizei count, | 3110 GLsizei count, |
3111 const volatile GLenum* bufs) { | 3111 const volatile GLenum* bufs) { |
3112 // Validate that count is non-negative before allocating a vector | 3112 // Validate that count is non-negative before allocating a vector |
3113 if (count < 0) { | 3113 if (count < 0) { |
3114 InsertError(GL_INVALID_VALUE, "count cannot be negative."); | 3114 InsertError(GL_INVALID_VALUE, "count cannot be negative."); |
3115 return error::kNoError; | 3115 return error::kNoError; |
3116 } | 3116 } |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3463 GLuint texture, | 3463 GLuint texture, |
3464 GLboolean promotion_hint, | 3464 GLboolean promotion_hint, |
3465 GLint display_x, | 3465 GLint display_x, |
3466 GLint display_y) { | 3466 GLint display_y) { |
3467 NOTIMPLEMENTED(); | 3467 NOTIMPLEMENTED(); |
3468 return error::kNoError; | 3468 return error::kNoError; |
3469 } | 3469 } |
3470 | 3470 |
3471 } // namespace gles2 | 3471 } // namespace gles2 |
3472 } // namespace gpu | 3472 } // namespace gpu |
OLD | NEW |