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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "ui/gl/gl_context_cgl.h" | 9 #include "ui/gl/gl_context_cgl.h" |
10 #include "ui/gl/gl_context_osmesa.h" | 10 #include "ui/gl/gl_context_osmesa.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 return context; | 38 return context; |
39 } | 39 } |
40 case kGLImplementationOSMesaGL: { | 40 case kGLImplementationOSMesaGL: { |
41 scoped_refptr<GLContext> context(new GLContextOSMesa(share_group)); | 41 scoped_refptr<GLContext> context(new GLContextOSMesa(share_group)); |
42 if (!context->Initialize(compatible_surface, gpu_preference)) | 42 if (!context->Initialize(compatible_surface, gpu_preference)) |
43 return NULL; | 43 return NULL; |
44 | 44 |
45 return context; | 45 return context; |
46 } | 46 } |
47 case kGLImplementationMockGL: | 47 case kGLImplementationMockGL: |
48 return new GLContextStub; | 48 return new GLContextStub(share_group); |
49 default: | 49 default: |
50 NOTREACHED(); | 50 NOTREACHED(); |
51 return NULL; | 51 return NULL; |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 } // namespace gfx | 55 } // namespace gfx |
OLD | NEW |