Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1477593002: gpu: Initial implementation of CommitOverlayPlanes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-cop-command
Patch Set: Remove NativeViewGLSurfaceEGL changes Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index e9c739e16ee98733c0b01167b3c079e999f886ed..1daba3372449119005d2d5c5067ca76f02eb25c9 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -4300,9 +4300,8 @@ void GLES2Implementation::PartialSwapBuffers(const gfx::Rect& sub_buffer) {
sub_buffer.x(), sub_buffer.y(), sub_buffer.width(), sub_buffer.height());
}
-void GLES2Implementation::CommitOverlayPlanesCHROMIUM() {
- // TODO(watk): crbug.com/560592
- NOTIMPLEMENTED();
+void GLES2Implementation::CommitOverlayPlanes() {
+ CommitOverlayPlanesCHROMIUM();
}
static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) {
@@ -4367,6 +4366,21 @@ void GLES2Implementation::ScheduleCALayerCHROMIUM(GLuint contents_texture_id,
buffer.offset());
}
+void GLES2Implementation::CommitOverlayPlanesCHROMIUM() {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] CommitOverlayPlanesCHROMIUM()");
+ TRACE_EVENT0("gpu", "GLES2::CommitOverlayPlanesCHROMIUM");
+
+ // Same flow control as GLES2Implementation::SwapBuffers (see comments there).
+ swap_buffers_tokens_.push(helper_->InsertToken());
+ helper_->CommitOverlayPlanesCHROMIUM();
+ helper_->CommandBufferHelper::Flush();
+ if (swap_buffers_tokens_.size() > kMaxSwapBuffers + 1) {
+ helper_->WaitForToken(swap_buffers_tokens_.front());
+ swap_buffers_tokens_.pop();
+ }
+}
+
GLboolean GLES2Implementation::EnableFeatureCHROMIUM(
const char* feature) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698