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 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4355 } | 4355 } |
4356 GLfloat* mem = static_cast<GLfloat*>(buffer.address()); | 4356 GLfloat* mem = static_cast<GLfloat*>(buffer.address()); |
4357 memcpy(mem + 0, contents_rect, 4 * sizeof(GLfloat)); | 4357 memcpy(mem + 0, contents_rect, 4 * sizeof(GLfloat)); |
4358 memcpy(mem + 4, bounds_size, 2 * sizeof(GLfloat)); | 4358 memcpy(mem + 4, bounds_size, 2 * sizeof(GLfloat)); |
4359 memcpy(mem + 6, transform, 16 * sizeof(GLfloat)); | 4359 memcpy(mem + 6, transform, 16 * sizeof(GLfloat)); |
4360 helper_->ScheduleCALayerCHROMIUM(contents_texture_id, opacity, | 4360 helper_->ScheduleCALayerCHROMIUM(contents_texture_id, opacity, |
4361 background_color, buffer.shm_id(), | 4361 background_color, buffer.shm_id(), |
4362 buffer.offset()); | 4362 buffer.offset()); |
4363 } | 4363 } |
4364 | 4364 |
| 4365 void GLES2Implementation::CommitOverlayPlanesCHROMIUM() { |
| 4366 NOTIMPLEMENTED(); |
| 4367 } |
| 4368 |
4365 GLboolean GLES2Implementation::EnableFeatureCHROMIUM( | 4369 GLboolean GLES2Implementation::EnableFeatureCHROMIUM( |
4366 const char* feature) { | 4370 const char* feature) { |
4367 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 4371 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
4368 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glEnableFeatureCHROMIUM(" | 4372 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glEnableFeatureCHROMIUM(" |
4369 << feature << ")"); | 4373 << feature << ")"); |
4370 TRACE_EVENT0("gpu", "GLES2::EnableFeatureCHROMIUM"); | 4374 TRACE_EVENT0("gpu", "GLES2::EnableFeatureCHROMIUM"); |
4371 typedef cmds::EnableFeatureCHROMIUM::Result Result; | 4375 typedef cmds::EnableFeatureCHROMIUM::Result Result; |
4372 Result* result = GetResultAs<Result*>(); | 4376 Result* result = GetResultAs<Result*>(); |
4373 if (!result) { | 4377 if (!result) { |
4374 return false; | 4378 return false; |
(...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6392 CheckGLError(); | 6396 CheckGLError(); |
6393 } | 6397 } |
6394 | 6398 |
6395 // Include the auto-generated part of this file. We split this because it means | 6399 // 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 | 6400 // 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. | 6401 // instead of having to edit some template or the code generator. |
6398 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6402 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
6399 | 6403 |
6400 } // namespace gles2 | 6404 } // namespace gles2 |
6401 } // namespace gpu | 6405 } // namespace gpu |
OLD | NEW |