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

Side by Side Diff: ui/gfx/gl/gl_context_osmesa.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_glx.cc ('k') | ui/gfx/gl/gl_context_wgl.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 #include <GL/osmesa.h> 5 #include <GL/osmesa.h>
6 6
7 #include "ui/gfx/gl/gl_context_osmesa.h" 7 #include "ui/gfx/gl/gl_context_osmesa.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/gl/gl_bindings.h" 10 #include "ui/gfx/gl/gl_bindings.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 size.width(), 60 size.width(),
61 size.height())) { 61 size.height())) {
62 LOG(ERROR) << "OSMesaMakeCurrent failed."; 62 LOG(ERROR) << "OSMesaMakeCurrent failed.";
63 Destroy(); 63 Destroy();
64 return false; 64 return false;
65 } 65 }
66 66
67 // Row 0 is at the top. 67 // Row 0 is at the top.
68 OSMesaPixelStore(OSMESA_Y_UP, 0); 68 OSMesaPixelStore(OSMESA_Y_UP, 0);
69 69
70 surface->OnMakeCurrent();
70 return true; 71 return true;
71 } 72 }
72 73
73 void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) { 74 void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) {
74 if (!IsCurrent(surface)) 75 if (!IsCurrent(surface))
75 return; 76 return;
76 77
77 OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0); 78 OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0);
78 } 79 }
79 80
(...skipping 18 matching lines...) Expand all
98 void* GLContextOSMesa::GetHandle() { 99 void* GLContextOSMesa::GetHandle() {
99 return context_; 100 return context_;
100 } 101 }
101 102
102 void GLContextOSMesa::SetSwapInterval(int interval) { 103 void GLContextOSMesa::SetSwapInterval(int interval) {
103 DCHECK(IsCurrent(NULL)); 104 DCHECK(IsCurrent(NULL));
104 LOG(WARNING) << "GLContextOSMesa::SetSwapInterval is ignored."; 105 LOG(WARNING) << "GLContextOSMesa::SetSwapInterval is ignored.";
105 } 106 }
106 107
107 } // namespace gfx 108 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_context_glx.cc ('k') | ui/gfx/gl/gl_context_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698