OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 << texture << ")"); | 3068 << texture << ")"); |
3069 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM"); | 3069 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM"); |
3070 helper_->DestroyStreamTextureCHROMIUM(texture); | 3070 helper_->DestroyStreamTextureCHROMIUM(texture); |
3071 } | 3071 } |
3072 | 3072 |
3073 void GLES2Implementation::PostSubBufferCHROMIUM( | 3073 void GLES2Implementation::PostSubBufferCHROMIUM( |
3074 GLint x, GLint y, GLint width, GLint height) { | 3074 GLint x, GLint y, GLint width, GLint height) { |
3075 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 3075 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
3076 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM(" | 3076 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] PostSubBufferCHROMIUM(" |
3077 << x << ", " << y << ", " << width << ", " << height << ")"); | 3077 << x << ", " << y << ", " << width << ", " << height << ")"); |
3078 TRACE_EVENT0("gpu", "GLES2::PostSubBufferCHROMIUM"); | 3078 TRACE_EVENT2("gpu", "GLES2::PostSubBufferCHROMIUM", |
| 3079 "width", width, "height", height); |
3079 | 3080 |
3080 // Same flow control as GLES2Implementation::SwapBuffers (see comments there). | 3081 // Same flow control as GLES2Implementation::SwapBuffers (see comments there). |
3081 swap_buffers_tokens_.push(helper_->InsertToken()); | 3082 swap_buffers_tokens_.push(helper_->InsertToken()); |
3082 helper_->PostSubBufferCHROMIUM(x, y, width, height); | 3083 helper_->PostSubBufferCHROMIUM(x, y, width, height); |
3083 helper_->CommandBufferHelper::Flush(); | 3084 helper_->CommandBufferHelper::Flush(); |
3084 if (swap_buffers_tokens_.size() > kMaxSwapBuffers + 1) { | 3085 if (swap_buffers_tokens_.size() > kMaxSwapBuffers + 1) { |
3085 helper_->WaitForToken(swap_buffers_tokens_.front()); | 3086 helper_->WaitForToken(swap_buffers_tokens_.front()); |
3086 swap_buffers_tokens_.pop(); | 3087 swap_buffers_tokens_.pop(); |
3087 } | 3088 } |
3088 } | 3089 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3426 | 3427 |
3427 void GLES2Implementation::PopGroupMarkerEXT() { | 3428 void GLES2Implementation::PopGroupMarkerEXT() { |
3428 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 3429 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
3429 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPopGroupMarkerEXT()"); | 3430 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glPopGroupMarkerEXT()"); |
3430 helper_->PopGroupMarkerEXT(); | 3431 helper_->PopGroupMarkerEXT(); |
3431 debug_marker_manager_.PopGroup(); | 3432 debug_marker_manager_.PopGroup(); |
3432 } | 3433 } |
3433 | 3434 |
3434 } // namespace gles2 | 3435 } // namespace gles2 |
3435 } // namespace gpu | 3436 } // namespace gpu |
OLD | NEW |