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

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

Issue 222333002: Plumb ScheduleOverlayPlane into the GPU process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 8 months 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
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 417833241d72e22fa7a42e5a65b79fa6ca890dd2..6b64d82eeaaaf172cf81013f36b03c420dd32204 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -2837,13 +2837,44 @@ void GLES2Implementation::SetSwapBuffersCompleteCallback(
swap_buffers_complete_callback_ = swap_buffers_complete_callback;
}
+static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) {
+ switch (plane_transform) {
+ case gfx::OVERLAY_TRANSFORM_INVALID:
+ break;
+ case gfx::OVERLAY_TRANSFORM_NONE:
+ return GL_OVERLAY_TRANSFORM_NONE_CHROMIUM;
+ case gfx::OVERLAY_TRANSFORM_FLIP_HORIZONTAL:
+ return GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM;
+ case gfx::OVERLAY_TRANSFORM_FLIP_VERTICAL:
+ return GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM;
+ case gfx::OVERLAY_TRANSFORM_ROTATE_90:
+ return GL_OVERLAY_TRANSFORM_ROTATE_90_CHROMIUM;
+ case gfx::OVERLAY_TRANSFORM_ROTATE_180:
+ return GL_OVERLAY_TRANSFORM_ROTATE_180_CHROMIUM;
+ case gfx::OVERLAY_TRANSFORM_ROTATE_270:
+ return GL_OVERLAY_TRANSFORM_ROTATE_270_CHROMIUM;
+ }
+ NOTREACHED();
+ return GL_OVERLAY_TRANSFORM_NONE_CHROMIUM;
+}
+
void GLES2Implementation::ScheduleOverlayPlane(
int plane_z_order,
gfx::OverlayTransform plane_transform,
unsigned overlay_texture_id,
const gfx::Rect& display_bounds,
const gfx::RectF& uv_rect) {
- NOTREACHED() << "Overlay supported isn't finished.";
+ ScheduleOverlayPlaneCHROMIUM(plane_z_order,
+ GetGLESOverlayTransform(plane_transform),
+ overlay_texture_id,
+ display_bounds.x(),
+ display_bounds.y(),
+ display_bounds.width(),
+ display_bounds.height(),
+ uv_rect.x(),
+ uv_rect.y(),
+ uv_rect.width(),
+ uv_rect.height());
}
void GLES2Implementation::OnSwapBuffersComplete() {
« no previous file with comments | « gpu/command_buffer/client/gles2_cmd_helper_autogen.h ('k') | gpu/command_buffer/client/gles2_implementation_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698