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

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

Issue 6840060: Progress towards fixing 77536 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 8 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
« no previous file with comments | « content/renderer/renderer_gl_context.cc ('k') | ui/gfx/gtk_native_view_id_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/renderer/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 active_url = GURL(web_view->mainFrame()->url()); 93 active_url = GURL(web_view->mainFrame()->url());
94 94
95 if (render_directly_to_web_view) { 95 if (render_directly_to_web_view) {
96 RenderView* renderview = RenderView::FromWebView(web_view); 96 RenderView* renderview = RenderView::FromWebView(web_view);
97 if (!renderview) 97 if (!renderview)
98 return false; 98 return false;
99 99
100 web_view_ = web_view; 100 web_view_ = web_view;
101 context_ = RendererGLContext::CreateViewContext( 101 context_ = RendererGLContext::CreateViewContext(
102 host, 102 host,
103 renderview->compositing_surface(),
103 renderview->routing_id(), 104 renderview->routing_id(),
104 kWebGraphicsContext3DPerferredGLExtensions, 105 kWebGraphicsContext3DPerferredGLExtensions,
105 attribs, 106 attribs,
106 active_url); 107 active_url);
107 if (context_) { 108 if (context_) {
108 context_->SetSwapBuffersCallback( 109 context_->SetSwapBuffersCallback(
109 NewCallback(this, 110 NewCallback(this,
110 &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffers)); 111 &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffers));
111 } 112 }
112 } else { 113 } else {
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 context_lost_callback_ = cb; 1057 context_lost_callback_ = cb;
1057 } 1058 }
1058 1059
1059 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() { 1060 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() {
1060 if (context_lost_callback_) { 1061 if (context_lost_callback_) {
1061 context_lost_callback_->onContextLost(); 1062 context_lost_callback_->onContextLost();
1062 } 1063 }
1063 } 1064 }
1064 1065
1065 #endif // defined(ENABLE_GPU) 1066 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/renderer/renderer_gl_context.cc ('k') | ui/gfx/gtk_native_view_id_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698