Chromium Code Reviews| Index: ui/gl/gl_context_osmesa.cc |
| diff --git a/ui/gl/gl_context_osmesa.cc b/ui/gl/gl_context_osmesa.cc |
| index ee0f7570ebc047bb799bbdf81ea453516e685e12..6821a03e3b3e64acac4ae17f632d606e4b501e18 100644 |
| --- a/ui/gl/gl_context_osmesa.cc |
| +++ b/ui/gl/gl_context_osmesa.cc |
| @@ -26,7 +26,17 @@ bool GLContextOSMesa::Initialize(GLSurface* compatible_surface, |
| OSMesaContext share_handle = static_cast<OSMesaContext>( |
| share_group() ? share_group()->GetHandle() : nullptr); |
| - GLuint format = compatible_surface->GetFormat(); |
| + GLuint format = 0; |
| + switch (compatible_surface->GetFormat()) { |
| + case GLSurface::SURFACE_OSMESA_BGRA: |
| + format = OSMESA_BGRA; |
| + break; |
| + case GLSurface::SURFACE_OSMESA_RGBA: |
| + format = OSMESA_RGBA; |
| + break; |
| + default: |
|
no sievers
2016/02/22 22:50:03
nit: NOTREACHED() (and remove line 40). Maybe we s
Jinsuk Kim
2016/02/23 01:27:38
Done.
|
| + break; |
| + } |
| DCHECK_NE(format, (unsigned)0); |
| context_ = OSMesaCreateContextExt(format, |
| 0, // depth bits |