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 "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 | 8 |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 4282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4293 | 4293 |
4294 void GLES2Implementation::Swap() { | 4294 void GLES2Implementation::Swap() { |
4295 SwapBuffers(); | 4295 SwapBuffers(); |
4296 } | 4296 } |
4297 | 4297 |
4298 void GLES2Implementation::PartialSwapBuffers(const gfx::Rect& sub_buffer) { | 4298 void GLES2Implementation::PartialSwapBuffers(const gfx::Rect& sub_buffer) { |
4299 PostSubBufferCHROMIUM( | 4299 PostSubBufferCHROMIUM( |
4300 sub_buffer.x(), sub_buffer.y(), sub_buffer.width(), sub_buffer.height()); | 4300 sub_buffer.x(), sub_buffer.y(), sub_buffer.width(), sub_buffer.height()); |
4301 } | 4301 } |
4302 | 4302 |
| 4303 void GLES2Implementation::CommitOverlayPlanesCHROMIUM() { |
| 4304 // TODO(watk): crbug.com/560592 |
| 4305 NOTIMPLEMENTED(); |
| 4306 } |
| 4307 |
4303 static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) { | 4308 static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) { |
4304 switch (plane_transform) { | 4309 switch (plane_transform) { |
4305 case gfx::OVERLAY_TRANSFORM_INVALID: | 4310 case gfx::OVERLAY_TRANSFORM_INVALID: |
4306 break; | 4311 break; |
4307 case gfx::OVERLAY_TRANSFORM_NONE: | 4312 case gfx::OVERLAY_TRANSFORM_NONE: |
4308 return GL_OVERLAY_TRANSFORM_NONE_CHROMIUM; | 4313 return GL_OVERLAY_TRANSFORM_NONE_CHROMIUM; |
4309 case gfx::OVERLAY_TRANSFORM_FLIP_HORIZONTAL: | 4314 case gfx::OVERLAY_TRANSFORM_FLIP_HORIZONTAL: |
4310 return GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM; | 4315 return GL_OVERLAY_TRANSFORM_FLIP_HORIZONTAL_CHROMIUM; |
4311 case gfx::OVERLAY_TRANSFORM_FLIP_VERTICAL: | 4316 case gfx::OVERLAY_TRANSFORM_FLIP_VERTICAL: |
4312 return GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM; | 4317 return GL_OVERLAY_TRANSFORM_FLIP_VERTICAL_CHROMIUM; |
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6392 CheckGLError(); | 6397 CheckGLError(); |
6393 } | 6398 } |
6394 | 6399 |
6395 // Include the auto-generated part of this file. We split this because it means | 6400 // Include the auto-generated part of this file. We split this because it means |
6396 // we can easily edit the non-auto generated parts right here in this file | 6401 // we can easily edit the non-auto generated parts right here in this file |
6397 // instead of having to edit some template or the code generator. | 6402 // instead of having to edit some template or the code generator. |
6398 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6403 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
6399 | 6404 |
6400 } // namespace gles2 | 6405 } // namespace gles2 |
6401 } // namespace gpu | 6406 } // namespace gpu |
OLD | NEW |