| 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/gl2ext.h> | 9 #include <GLES2/gl2ext.h> |
| 10 #include <GLES2/gl2extchromium.h> | 10 #include <GLES2/gl2extchromium.h> |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 | 827 |
| 828 void GLES2Implementation::ShallowFlushCHROMIUM() { | 828 void GLES2Implementation::ShallowFlushCHROMIUM() { |
| 829 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 829 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 830 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glShallowFlushCHROMIUM()"); | 830 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glShallowFlushCHROMIUM()"); |
| 831 // Flush our command buffer | 831 // Flush our command buffer |
| 832 // (tell the service to execute up to the flush cmd.) | 832 // (tell the service to execute up to the flush cmd.) |
| 833 helper_->CommandBufferHelper::Flush(); | 833 helper_->CommandBufferHelper::Flush(); |
| 834 // TODO(piman): Add the FreeEverything() logic here. | 834 // TODO(piman): Add the FreeEverything() logic here. |
| 835 } | 835 } |
| 836 | 836 |
| 837 void GLES2Implementation::OrderingBarrierCHROMIUM() { |
| 838 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glOrderingBarrierCHROMIUM"); |
| 839 // Flush command buffer at the GPU channel level. May be implemented as |
| 840 // Flush(). |
| 841 helper_->CommandBufferHelper::OrderingBarrier(); |
| 842 } |
| 843 |
| 837 void GLES2Implementation::Finish() { | 844 void GLES2Implementation::Finish() { |
| 838 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 845 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 839 FinishHelper(); | 846 FinishHelper(); |
| 840 } | 847 } |
| 841 | 848 |
| 842 void GLES2Implementation::ShallowFinishCHROMIUM() { | 849 void GLES2Implementation::ShallowFinishCHROMIUM() { |
| 843 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 850 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 844 TRACE_EVENT0("gpu", "GLES2::ShallowFinishCHROMIUM"); | 851 TRACE_EVENT0("gpu", "GLES2::ShallowFinishCHROMIUM"); |
| 845 // Flush our command buffer (tell the service to execute up to the flush cmd | 852 // Flush our command buffer (tell the service to execute up to the flush cmd |
| 846 // and don't return until it completes). | 853 // and don't return until it completes). |
| (...skipping 3535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4382 return false; | 4389 return false; |
| 4383 } | 4390 } |
| 4384 | 4391 |
| 4385 // Include the auto-generated part of this file. We split this because it means | 4392 // Include the auto-generated part of this file. We split this because it means |
| 4386 // we can easily edit the non-auto generated parts right here in this file | 4393 // we can easily edit the non-auto generated parts right here in this file |
| 4387 // instead of having to edit some template or the code generator. | 4394 // instead of having to edit some template or the code generator. |
| 4388 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4395 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 4389 | 4396 |
| 4390 } // namespace gles2 | 4397 } // namespace gles2 |
| 4391 } // namespace gpu | 4398 } // namespace gpu |
| OLD | NEW |