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

Side by Side Diff: ui/gfx/gl/gl_context_glx.cc

Issue 7395020: Create new GLSurface for cross process image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 5 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 | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_osmesa.cc » ('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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gfx/gl/gl_context_glx.h" 9 #include "ui/gfx/gl/gl_context_glx.h"
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 if (!glXMakeCurrent( 165 if (!glXMakeCurrent(
166 GLSurfaceGLX::GetDisplay(), 166 GLSurfaceGLX::GetDisplay(),
167 reinterpret_cast<GLXDrawable>(surface->GetHandle()), 167 reinterpret_cast<GLXDrawable>(surface->GetHandle()),
168 static_cast<GLXContext>(context_))) { 168 static_cast<GLXContext>(context_))) {
169 LOG(ERROR) << "Couldn't make context current with X drawable."; 169 LOG(ERROR) << "Couldn't make context current with X drawable.";
170 Destroy(); 170 Destroy();
171 return false; 171 return false;
172 } 172 }
173 173
174 surface->OnMakeCurrent();
174 return true; 175 return true;
175 } 176 }
176 177
177 void GLContextGLX::ReleaseCurrent(GLSurface* surface) { 178 void GLContextGLX::ReleaseCurrent(GLSurface* surface) {
178 if (!IsCurrent(surface)) 179 if (!IsCurrent(surface))
179 return; 180 return;
180 181
181 glXMakeContextCurrent(GLSurfaceGLX::GetDisplay(), 0, 0, NULL); 182 glXMakeContextCurrent(GLSurfaceGLX::GetDisplay(), 0, 0, NULL);
182 } 183 }
183 184
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 233 }
233 234
234 return GLContext::GetExtensions(); 235 return GLContext::GetExtensions();
235 } 236 }
236 237
237 bool GLContextGLX::WasAllocatedUsingARBRobustness() { 238 bool GLContextGLX::WasAllocatedUsingARBRobustness() {
238 return GLSurfaceGLX::IsCreateContextRobustnessSupported(); 239 return GLSurfaceGLX::IsCreateContextRobustnessSupported();
239 } 240 }
240 241
241 } // namespace gfx 242 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_egl.cc ('k') | ui/gfx/gl/gl_context_osmesa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698