| 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_gl_api_implementation.h" | 5 #include "ui/gl/gl_gl_api_implementation.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 break; | 156 break; |
| 157 case GL_LUMINANCE_ALPHA: | 157 case GL_LUMINANCE_ALPHA: |
| 158 gl_internal_format = GL_LUMINANCE_ALPHA16F_ARB; | 158 gl_internal_format = GL_LUMINANCE_ALPHA16F_ARB; |
| 159 break; | 159 break; |
| 160 case GL_LUMINANCE: | 160 case GL_LUMINANCE: |
| 161 gl_internal_format = GL_LUMINANCE16F_ARB; | 161 gl_internal_format = GL_LUMINANCE16F_ARB; |
| 162 break; | 162 break; |
| 163 case GL_ALPHA: | 163 case GL_ALPHA: |
| 164 gl_internal_format = GL_ALPHA16F_ARB; | 164 gl_internal_format = GL_ALPHA16F_ARB; |
| 165 break; | 165 break; |
| 166 // RED and RG are reached here because on Desktop GL core profile, |
| 167 // LUMINANCE/ALPHA formats are emulated through RED and RG in Chrome. |
| 168 case GL_RED: |
| 169 gl_internal_format = GL_R16F; |
| 170 break; |
| 171 case GL_RG: |
| 172 gl_internal_format = GL_RG16F; |
| 173 break; |
| 166 default: | 174 default: |
| 167 NOTREACHED(); | 175 NOTREACHED(); |
| 168 break; | 176 break; |
| 169 } | 177 } |
| 170 } | 178 } |
| 171 | 179 |
| 172 return gl_internal_format; | 180 return gl_internal_format; |
| 173 } | 181 } |
| 174 | 182 |
| 175 static inline GLenum GetTexFormat(GLenum format) { | 183 static inline GLenum GetTexFormat(GLenum format) { |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 | 674 |
| 667 void VirtualGLApi::glFlushFn() { | 675 void VirtualGLApi::glFlushFn() { |
| 668 GLApiBase::glFlushFn(); | 676 GLApiBase::glFlushFn(); |
| 669 } | 677 } |
| 670 | 678 |
| 671 void VirtualGLApi::glFinishFn() { | 679 void VirtualGLApi::glFinishFn() { |
| 672 GLApiBase::glFinishFn(); | 680 GLApiBase::glFinishFn(); |
| 673 } | 681 } |
| 674 | 682 |
| 675 } // namespace gl | 683 } // namespace gl |
| OLD | NEW |