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 <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 break; | 78 break; |
79 default: | 79 default: |
80 NOTREACHED(); | 80 NOTREACHED(); |
81 break; | 81 break; |
82 } | 82 } |
83 return gl_internal_format; | 83 return gl_internal_format; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 if (type == GL_FLOAT && gfx::g_version_info->is_angle && | 87 if (type == GL_FLOAT && gfx::g_version_info->is_angle && |
88 gfx::g_version_info->is_es2) { | 88 gfx::g_version_info->is_es && gfx::g_version_info->major_version == 2) { |
89 // It's possible that the texture is using a sized internal format, and | 89 // It's possible that the texture is using a sized internal format, and |
90 // ANGLE exposing GLES2 API doesn't support those. | 90 // ANGLE exposing GLES2 API doesn't support those. |
91 // TODO(oetuaho@nvidia.com): Remove these conversions once ANGLE has the | 91 // TODO(oetuaho@nvidia.com): Remove these conversions once ANGLE has the |
92 // support. | 92 // support. |
93 // http://code.google.com/p/angleproject/issues/detail?id=556 | 93 // http://code.google.com/p/angleproject/issues/detail?id=556 |
94 switch (format) { | 94 switch (format) { |
95 case GL_RGBA: | 95 case GL_RGBA: |
96 gl_internal_format = GL_RGBA; | 96 gl_internal_format = GL_RGBA; |
97 break; | 97 break; |
98 case GL_RGB: | 98 case GL_RGB: |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() | 536 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() |
537 : old_gl_api_(GetCurrentGLApi()) { | 537 : old_gl_api_(GetCurrentGLApi()) { |
538 SetGLToRealGLApi(); | 538 SetGLToRealGLApi(); |
539 } | 539 } |
540 | 540 |
541 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { | 541 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { |
542 SetGLApi(old_gl_api_); | 542 SetGLApi(old_gl_api_); |
543 } | 543 } |
544 | 544 |
545 } // namespace gfx | 545 } // namespace gfx |
OLD | NEW |