| 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 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 sub_buffer.height()); | 2784 sub_buffer.height()); |
| 2785 gpu_control_->Echo(base::Bind(&GLES2Implementation::OnSwapBuffersComplete, | 2785 gpu_control_->Echo(base::Bind(&GLES2Implementation::OnSwapBuffersComplete, |
| 2786 weak_ptr_factory_.GetWeakPtr())); | 2786 weak_ptr_factory_.GetWeakPtr())); |
| 2787 } | 2787 } |
| 2788 | 2788 |
| 2789 void GLES2Implementation::SetSwapBuffersCompleteCallback( | 2789 void GLES2Implementation::SetSwapBuffersCompleteCallback( |
| 2790 const base::Closure& swap_buffers_complete_callback) { | 2790 const base::Closure& swap_buffers_complete_callback) { |
| 2791 swap_buffers_complete_callback_ = swap_buffers_complete_callback; | 2791 swap_buffers_complete_callback_ = swap_buffers_complete_callback; |
| 2792 } | 2792 } |
| 2793 | 2793 |
| 2794 void GLES2Implementation::ScheduleOverlayPlane(int plane_z_order, |
| 2795 unsigned plane_transform, |
| 2796 unsigned overlay_texture_id, |
| 2797 const gfx::Rect& display_bounds, |
| 2798 const gfx::RectF& uv_rect) { |
| 2799 NOTREACHED() << "Overlay supported isn't finished."; |
| 2800 } |
| 2801 |
| 2794 void GLES2Implementation::OnSwapBuffersComplete() { | 2802 void GLES2Implementation::OnSwapBuffersComplete() { |
| 2795 if (!swap_buffers_complete_callback_.is_null()) | 2803 if (!swap_buffers_complete_callback_.is_null()) |
| 2796 swap_buffers_complete_callback_.Run(); | 2804 swap_buffers_complete_callback_.Run(); |
| 2797 } | 2805 } |
| 2798 | 2806 |
| 2799 GLboolean GLES2Implementation::EnableFeatureCHROMIUM( | 2807 GLboolean GLES2Implementation::EnableFeatureCHROMIUM( |
| 2800 const char* feature) { | 2808 const char* feature) { |
| 2801 GPU_CLIENT_SINGLE_THREAD_CHECK(); | 2809 GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 2802 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glEnableFeatureCHROMIUM(" | 2810 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glEnableFeatureCHROMIUM(" |
| 2803 << feature << ")"); | 2811 << feature << ")"); |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3920 CheckGLError(); | 3928 CheckGLError(); |
| 3921 } | 3929 } |
| 3922 | 3930 |
| 3923 // Include the auto-generated part of this file. We split this because it means | 3931 // Include the auto-generated part of this file. We split this because it means |
| 3924 // we can easily edit the non-auto generated parts right here in this file | 3932 // we can easily edit the non-auto generated parts right here in this file |
| 3925 // instead of having to edit some template or the code generator. | 3933 // instead of having to edit some template or the code generator. |
| 3926 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 3934 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 3927 | 3935 |
| 3928 } // namespace gles2 | 3936 } // namespace gles2 |
| 3929 } // namespace gpu | 3937 } // namespace gpu |
| OLD | NEW |