summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/client/gles2_implementation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/client/gles2_implementation.cc')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 5fce838..6d402c5 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2649,5 +2649,21 @@ void GLES2Implementation::DestroyStreamTextureCHROMIUM(GLuint texture) {
helper_->DestroyStreamTextureCHROMIUM(texture);
}
+void GLES2Implementation::PostSubBufferCHROMIUM(
+ GLint x, GLint y, GLint width, GLint height) {
+ GPU_CLIENT_LOG("[" << this << "] PostSubBufferCHROMIUM("
+ << x << ", " << y << ", " << width << ", " << height << ")");
+ TRACE_EVENT0("gpu", "GLES2::PostSubBufferCHROMIUM");
+
+ // Same flow control as GLES2Implementation::SwapBuffers (see comments there).
+ swap_buffers_tokens_.push(helper_->InsertToken());
+ helper_->PostSubBufferCHROMIUM(x, y, width, height);
+ helper_->CommandBufferHelper::Flush();
+ if (swap_buffers_tokens_.size() > kMaxSwapBuffers + 1) {
+ helper_->WaitForToken(swap_buffers_tokens_.front());
+ swap_buffers_tokens_.pop();
+ }
+}
+
} // namespace gles2
} // namespace gpu