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 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // Whether or not we should execute more commands. | 114 // Whether or not we should execute more commands. |
115 void SetScheduled(bool is_scheduled); | 115 void SetScheduled(bool is_scheduled); |
116 | 116 |
117 void DeferToFence(base::Closure task); | 117 void DeferToFence(base::Closure task); |
118 | 118 |
119 // Make the surface's context current. | 119 // Make the surface's context current. |
120 bool MakeCurrent(); | 120 bool MakeCurrent(); |
121 | 121 |
122 // Set the default swap interval on the surface. | 122 // Set the default swap interval on the surface. |
123 void SetSwapInterval(); | 123 static void SetSwapInterval(gfx::GLContext* context); |
124 | 124 |
125 void Suspend(); | 125 void Suspend(); |
126 | 126 |
127 private: | 127 private: |
128 gpu::GpuScheduler* Scheduler(); | 128 gpu::GpuScheduler* Scheduler(); |
129 gpu::gles2::GLES2Decoder* Decoder(); | 129 gpu::gles2::GLES2Decoder* Decoder(); |
130 | 130 |
131 // IPC::Message handlers. | 131 // IPC::Message handlers. |
132 void OnNewSurfaceACK(uint64 surface_handle, TransportDIB::Handle shm_handle); | 132 void OnNewSurfaceACK(uint64 surface_handle, TransportDIB::Handle shm_handle); |
133 void OnBuffersSwappedACK(); | 133 void OnBuffersSwappedACK(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 gfx::Size new_size_; | 182 gfx::Size new_size_; |
183 bool transport_; | 183 bool transport_; |
184 bool did_set_swap_interval_; | 184 bool did_set_swap_interval_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); | 186 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); |
187 }; | 187 }; |
188 | 188 |
189 #endif // defined(ENABLE_GPU) | 189 #endif // defined(ENABLE_GPU) |
190 | 190 |
191 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 191 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
OLD | NEW |