| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/gfx/gl/gl_bindings.h" | 9 #include "app/gfx/gl/gl_bindings.h" |
| 10 #include "app/gfx/gl/gl_context_osmesa.h" | 10 #include "app/gfx/gl/gl_context_osmesa.h" |
| 11 #include "base/logging.h" |
| 11 | 12 |
| 12 namespace gfx { | 13 namespace gfx { |
| 13 | 14 |
| 14 OSMesaGLContext::OSMesaGLContext() : context_(NULL) | 15 OSMesaGLContext::OSMesaGLContext() : context_(NULL) |
| 15 { | 16 { |
| 16 } | 17 } |
| 17 | 18 |
| 18 OSMesaGLContext::~OSMesaGLContext() { | 19 OSMesaGLContext::~OSMesaGLContext() { |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 buffer_.reset(new_buffer.release()); | 112 buffer_.reset(new_buffer.release()); |
| 112 size_ = new_size; | 113 size_ = new_size; |
| 113 | 114 |
| 114 // If this context is current, need to call MakeCurrent again so OSMesa uses | 115 // If this context is current, need to call MakeCurrent again so OSMesa uses |
| 115 // the new buffer. | 116 // the new buffer. |
| 116 if (IsCurrent()) | 117 if (IsCurrent()) |
| 117 MakeCurrent(); | 118 MakeCurrent(); |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace gfx | 121 } // namespace gfx |
| OLD | NEW |