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

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

Issue 2101393003: ui/gl: On a core profile use sized types for R32F and RG32F (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | 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 <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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 break; 134 break;
135 case GL_LUMINANCE_ALPHA: 135 case GL_LUMINANCE_ALPHA:
136 gl_internal_format = GL_LUMINANCE_ALPHA32F_ARB; 136 gl_internal_format = GL_LUMINANCE_ALPHA32F_ARB;
137 break; 137 break;
138 case GL_LUMINANCE: 138 case GL_LUMINANCE:
139 gl_internal_format = GL_LUMINANCE32F_ARB; 139 gl_internal_format = GL_LUMINANCE32F_ARB;
140 break; 140 break;
141 case GL_ALPHA: 141 case GL_ALPHA:
142 gl_internal_format = GL_ALPHA32F_ARB; 142 gl_internal_format = GL_ALPHA32F_ARB;
143 break; 143 break;
144 // RED and RG are reached here because on Desktop GL core profile,
145 // LUMINANCE/ALPHA formats are emulated through RED and RG in Chrome.
146 case GL_RED:
147 gl_internal_format = GL_R32F;
148 break;
149 case GL_RG:
150 gl_internal_format = GL_RG32F;
151 break;
144 default: 152 default:
145 // We can't assert here because if the client context is ES3, 153 // We can't assert here because if the client context is ES3,
146 // all sized internal_format will reach here. 154 // all sized internal_format will reach here.
147 break; 155 break;
148 } 156 }
149 } else if (type == GL_HALF_FLOAT_OES) { 157 } else if (type == GL_HALF_FLOAT_OES) {
150 switch (internal_format) { 158 switch (internal_format) {
151 case GL_RGBA: 159 case GL_RGBA:
152 gl_internal_format = GL_RGBA16F_ARB; 160 gl_internal_format = GL_RGBA16F_ARB;
153 break; 161 break;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 682
675 void VirtualGLApi::glFlushFn() { 683 void VirtualGLApi::glFlushFn() {
676 GLApiBase::glFlushFn(); 684 GLApiBase::glFlushFn();
677 } 685 }
678 686
679 void VirtualGLApi::glFinishFn() { 687 void VirtualGLApi::glFinishFn() {
680 GLApiBase::glFinishFn(); 688 GLApiBase::glFinishFn();
681 } 689 }
682 690
683 } // namespace gl 691 } // namespace gl
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698