Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 7756004: Create a new GrGLInterface for each GrContext so callback can be used to set GL-context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: switch machines Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 return context_lost_reason_; 1026 return context_lost_reason_;
1027 } 1027 }
1028 1028
1029 void WebGraphicsContext3DCommandBufferImpl:: 1029 void WebGraphicsContext3DCommandBufferImpl::
1030 setSwapBuffersCompleteCallbackCHROMIUM( 1030 setSwapBuffersCompleteCallbackCHROMIUM(
1031 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) { 1031 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) {
1032 swapbuffers_complete_callback_ = cb; 1032 swapbuffers_complete_callback_ = cb;
1033 } 1033 }
1034 1034
1035 #if WEBKIT_USING_SKIA 1035 #if WEBKIT_USING_SKIA
1036 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::grGLInterface() { 1036 GrGLInterface* WebGraphicsContext3DCommandBufferImpl::onCreateGrGLInterface() {
1037 return webkit_glue::GetCommandBufferSkiaGLBinding(); 1037 return webkit_glue::CreateCommandBufferSkiaGLBinding();
1038 } 1038 }
1039 #endif 1039 #endif
1040 1040
1041 namespace { 1041 namespace {
1042 1042
1043 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) { 1043 WGC3Denum convertReason(RendererGLContext::ContextLostReason reason) {
1044 switch (reason) { 1044 switch (reason) {
1045 case RendererGLContext::kGuilty: 1045 case RendererGLContext::kGuilty:
1046 return GL_GUILTY_CONTEXT_RESET_ARB; 1046 return GL_GUILTY_CONTEXT_RESET_ARB;
1047 case RendererGLContext::kInnocent: 1047 case RendererGLContext::kInnocent:
(...skipping 16 matching lines...) Expand all
1064 } 1064 }
1065 #ifndef WTF_USE_THREADED_COMPOSITING 1065 #ifndef WTF_USE_THREADED_COMPOSITING
1066 RenderView* renderview = 1066 RenderView* renderview =
1067 web_view_ ? RenderView::FromWebView(web_view_) : NULL; 1067 web_view_ ? RenderView::FromWebView(web_view_) : NULL;
1068 if (renderview) 1068 if (renderview)
1069 renderview->OnViewContextSwapBuffersAborted(); 1069 renderview->OnViewContextSwapBuffersAborted();
1070 #endif 1070 #endif
1071 } 1071 }
1072 1072
1073 #endif // defined(ENABLE_GPU) 1073 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h ('k') | ui/gfx/gl/gl_bindings_skia_in_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698