OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
8 | 8 |
9 #include "gpu/GLES2/gl2.h" | 9 #include "gpu/GLES2/gl2.h" |
10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 | 1133 |
1134 return context_lost_reason_; | 1134 return context_lost_reason_; |
1135 } | 1135 } |
1136 | 1136 |
1137 void WebGraphicsContext3DCommandBufferImpl:: | 1137 void WebGraphicsContext3DCommandBufferImpl:: |
1138 setSwapBuffersCompleteCallbackCHROMIUM( | 1138 setSwapBuffersCompleteCallbackCHROMIUM( |
1139 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) { | 1139 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) { |
1140 swapbuffers_complete_callback_ = cb; | 1140 swapbuffers_complete_callback_ = cb; |
1141 } | 1141 } |
1142 | 1142 |
| 1143 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, |
| 1144 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) |
| 1145 |
1143 #if WEBKIT_USING_SKIA | 1146 #if WEBKIT_USING_SKIA |
1144 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1147 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
1145 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1148 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
1146 } | 1149 } |
1147 #endif | 1150 #endif |
1148 | 1151 |
1149 namespace { | 1152 namespace { |
1150 | 1153 |
1151 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) { | 1154 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) { |
1152 switch (reason) { | 1155 switch (reason) { |
(...skipping 17 matching lines...) Expand all Loading... |
1170 if (context_lost_callback_) { | 1173 if (context_lost_callback_) { |
1171 context_lost_callback_->onContextLost(); | 1174 context_lost_callback_->onContextLost(); |
1172 } | 1175 } |
1173 RenderViewImpl* renderview = | 1176 RenderViewImpl* renderview = |
1174 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; | 1177 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; |
1175 if (renderview) | 1178 if (renderview) |
1176 renderview->OnViewContextSwapBuffersAborted(); | 1179 renderview->OnViewContextSwapBuffersAborted(); |
1177 } | 1180 } |
1178 | 1181 |
1179 #endif // defined(ENABLE_GPU) | 1182 #endif // defined(ENABLE_GPU) |
OLD | NEW |