| 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 "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
| 10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 1143 DELEGATE_TO_GL_5(texImageIOSurface2DCHROMIUM, TexImageIOSurface2DCHROMIUM, |
| 1144 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) | 1144 WGC3Denum, WGC3Dint, WGC3Dint, WGC3Duint, WGC3Duint) |
| 1145 | 1145 |
| 1146 DELEGATE_TO_GL_5(texStorage2DEXT, TexStorage2DEXT, |
| 1147 WGC3Denum, WGC3Dint, WGC3Duint, WGC3Dint, WGC3Dint) |
| 1148 |
| 1146 #if WEBKIT_USING_SKIA | 1149 #if WEBKIT_USING_SKIA |
| 1147 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { | 1150 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() { |
| 1148 return webkit_glue::CreateCommandBufferSkiaGLBinding(); | 1151 return webkit_glue::CreateCommandBufferSkiaGLBinding(); |
| 1149 } | 1152 } |
| 1150 #endif | 1153 #endif |
| 1151 | 1154 |
| 1152 namespace { | 1155 namespace { |
| 1153 | 1156 |
| 1154 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) { | 1157 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) { |
| 1155 switch (reason) { | 1158 switch (reason) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1173 if (context_lost_callback_) { | 1176 if (context_lost_callback_) { |
| 1174 context_lost_callback_->onContextLost(); | 1177 context_lost_callback_->onContextLost(); |
| 1175 } | 1178 } |
| 1176 RenderViewImpl* renderview = | 1179 RenderViewImpl* renderview = |
| 1177 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; | 1180 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; |
| 1178 if (renderview) | 1181 if (renderview) |
| 1179 renderview->OnViewContextSwapBuffersAborted(); | 1182 renderview->OnViewContextSwapBuffersAborted(); |
| 1180 } | 1183 } |
| 1181 | 1184 |
| 1182 #endif // defined(ENABLE_GPU) | 1185 #endif // defined(ENABLE_GPU) |
| OLD | NEW |