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 <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 // Flush our command buffer | 806 // Flush our command buffer |
807 // (tell the service to execute up to the flush cmd.) | 807 // (tell the service to execute up to the flush cmd.) |
808 helper_->CommandBufferHelper::Flush(); | 808 helper_->CommandBufferHelper::Flush(); |
809 } | 809 } |
810 | 810 |
811 void GLES2Implementation::Finish() { | 811 void GLES2Implementation::Finish() { |
812 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 812 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
813 FinishHelper(); | 813 FinishHelper(); |
814 } | 814 } |
815 | 815 |
| 816 void GLES2Implementation::ShallowFinishCHROMIUM() { |
| 817 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 818 // Flush our command buffer (tell the service to execute up to the flush cmd |
| 819 // and don't return until it completes). |
| 820 helper_->CommandBufferHelper::Finish(); |
| 821 } |
| 822 |
816 bool GLES2Implementation::MustBeContextLost() { | 823 bool GLES2Implementation::MustBeContextLost() { |
817 bool context_lost = helper_->IsContextLost(); | 824 bool context_lost = helper_->IsContextLost(); |
818 if (!context_lost) { | 825 if (!context_lost) { |
819 WaitForCmd(); | 826 WaitForCmd(); |
820 context_lost = helper_->IsContextLost(); | 827 context_lost = helper_->IsContextLost(); |
821 } | 828 } |
822 GPU_CHECK(context_lost); | 829 GPU_CHECK(context_lost); |
823 return context_lost; | 830 return context_lost; |
824 } | 831 } |
825 | 832 |
(...skipping 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3844 CheckGLError(); | 3851 CheckGLError(); |
3845 } | 3852 } |
3846 | 3853 |
3847 // Include the auto-generated part of this file. We split this because it means | 3854 // Include the auto-generated part of this file. We split this because it means |
3848 // we can easily edit the non-auto generated parts right here in this file | 3855 // we can easily edit the non-auto generated parts right here in this file |
3849 // instead of having to edit some template or the code generator. | 3856 // instead of having to edit some template or the code generator. |
3850 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 3857 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
3851 | 3858 |
3852 } // namespace gles2 | 3859 } // namespace gles2 |
3853 } // namespace gpu | 3860 } // namespace gpu |
OLD | NEW |