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 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
10 #endif | 10 #endif |
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1956 | 1956 |
1957 void WebGraphicsContext3DInProcessCommandBufferImpl::signalSyncPoint( | 1957 void WebGraphicsContext3DInProcessCommandBufferImpl::signalSyncPoint( |
1958 unsigned sync_point, | 1958 unsigned sync_point, |
1959 WebGraphicsSyncPointCallback* callback) { | 1959 WebGraphicsSyncPointCallback* callback) { |
1960 // Take ownership of the callback. | 1960 // Take ownership of the callback. |
1961 context_->SetSignalSyncPointCallback(make_scoped_ptr(callback)); | 1961 context_->SetSignalSyncPointCallback(make_scoped_ptr(callback)); |
1962 // Stick something in the command buffer. | 1962 // Stick something in the command buffer. |
1963 shallowFlushCHROMIUM(); | 1963 shallowFlushCHROMIUM(); |
1964 } | 1964 } |
1965 | 1965 |
| 1966 void WebGraphicsContext3DInProcessCommandBufferImpl::signalQuery( |
| 1967 unsigned query, |
| 1968 WebGraphicsSyncPointCallback* callback) { |
| 1969 finish(); |
| 1970 // Take ownership of the callback. |
| 1971 context_->SetSignalSyncPointCallback(make_scoped_ptr(callback)); |
| 1972 // Stick something in the command buffer. |
| 1973 shallowFlushCHROMIUM(); |
| 1974 } |
| 1975 |
1966 void WebGraphicsContext3DInProcessCommandBufferImpl::loseContextCHROMIUM( | 1976 void WebGraphicsContext3DInProcessCommandBufferImpl::loseContextCHROMIUM( |
1967 WGC3Denum current, WGC3Denum other) { | 1977 WGC3Denum current, WGC3Denum other) { |
1968 context_->LoseContext(current, other); | 1978 context_->LoseContext(current, other); |
1969 } | 1979 } |
1970 | 1980 |
1971 DELEGATE_TO_GL_9(asyncTexImage2DCHROMIUM, AsyncTexImage2DCHROMIUM, | 1981 DELEGATE_TO_GL_9(asyncTexImage2DCHROMIUM, AsyncTexImage2DCHROMIUM, |
1972 WGC3Denum, WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, WGC3Dint, | 1982 WGC3Denum, WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, WGC3Dint, |
1973 WGC3Denum, WGC3Denum, const void*) | 1983 WGC3Denum, WGC3Denum, const void*) |
1974 | 1984 |
1975 DELEGATE_TO_GL_9(asyncTexSubImage2DCHROMIUM, AsyncTexSubImage2DCHROMIUM, | 1985 DELEGATE_TO_GL_9(asyncTexSubImage2DCHROMIUM, AsyncTexSubImage2DCHROMIUM, |
1976 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, | 1986 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, WGC3Dsizei, |
1977 WGC3Denum, WGC3Denum, const void*) | 1987 WGC3Denum, WGC3Denum, const void*) |
1978 | 1988 |
1979 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, | 1989 DELEGATE_TO_GL_1(waitAsyncTexImage2DCHROMIUM, WaitAsyncTexImage2DCHROMIUM, |
1980 WGC3Denum) | 1990 WGC3Denum) |
1981 | 1991 |
1982 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator( | 1992 void WebGraphicsContext3DInProcessCommandBufferImpl::SetGpuMemoryBufferCreator( |
1983 GpuMemoryBufferCreator* creator) { | 1993 GpuMemoryBufferCreator* creator) { |
1984 g_gpu_memory_buffer_creator = creator; | 1994 g_gpu_memory_buffer_creator = creator; |
1985 } | 1995 } |
1986 | 1996 |
1987 } // namespace gpu | 1997 } // namespace gpu |
1988 } // namespace webkit | 1998 } // namespace webkit |
OLD | NEW |