| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gl/gl_surface.h" | 5 #include "ui/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 GC window_graphics_context_; | 46 GC window_graphics_context_; |
| 47 gfx::AcceleratedWidget window_; | 47 gfx::AcceleratedWidget window_; |
| 48 GC pixmap_graphics_context_; | 48 GC pixmap_graphics_context_; |
| 49 Pixmap pixmap_; | 49 Pixmap pixmap_; |
| 50 | 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa); | 51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceOSMesa); |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 bool GLSurface::InitializePreBindingsInternal(GLImplementation) { |
| 55 return true; |
| 56 } |
| 57 |
| 54 bool GLSurface::InitializeOneOffInternal() { | 58 bool GLSurface::InitializeOneOffInternal() { |
| 55 switch (GetGLImplementation()) { | 59 switch (GetGLImplementation()) { |
| 56 case kGLImplementationDesktopGL: | 60 case kGLImplementationDesktopGL: |
| 57 if (!GLSurfaceGLX::InitializeOneOff()) { | 61 if (!GLSurfaceGLX::InitializeOneOff()) { |
| 58 LOG(ERROR) << "GLSurfaceGLX::InitializeOneOff failed."; | 62 LOG(ERROR) << "GLSurfaceGLX::InitializeOneOff failed."; |
| 59 return false; | 63 return false; |
| 60 } | 64 } |
| 61 break; | 65 break; |
| 62 case kGLImplementationOSMesaGL: | 66 case kGLImplementationOSMesaGL: |
| 63 if (!NativeViewGLSurfaceOSMesa::InitializeOneOff()) { | 67 if (!NativeViewGLSurfaceOSMesa::InitializeOneOff()) { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 331 } |
| 328 case kGLImplementationMockGL: | 332 case kGLImplementationMockGL: |
| 329 return new GLSurfaceStub; | 333 return new GLSurfaceStub; |
| 330 default: | 334 default: |
| 331 NOTREACHED(); | 335 NOTREACHED(); |
| 332 return NULL; | 336 return NULL; |
| 333 } | 337 } |
| 334 } | 338 } |
| 335 | 339 |
| 336 } // namespace gfx | 340 } // namespace gfx |
| OLD | NEW |