Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Side by Side Diff: ui/gl/gl_gl_api_implementation.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_egl_api_implementation.cc ('k') | ui/gl/gl_glx_api_implementation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_egl_api_implementation.cc ('k') | ui/gl/gl_glx_api_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698