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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 2680703003: Reland of Select correct copy method for DoCopySubTexture (Closed)
Patch Set: fix perf regression on chromeos Created 3 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
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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 case GL_RG16UI: 1302 case GL_RG16UI:
1303 case GL_RG16I: 1303 case GL_RG16I:
1304 case GL_RG32UI: 1304 case GL_RG32UI:
1305 case GL_RG32I: 1305 case GL_RG32I:
1306 return true; 1306 return true;
1307 default: 1307 default:
1308 return false; 1308 return false;
1309 } 1309 }
1310 } 1310 }
1311 1311
1312 GLint GLES2Util::GetColorEncodingFromInternalFormat(uint32_t internalformat) {
1313 switch (internalformat) {
1314 case GL_SRGB_EXT:
1315 case GL_SRGB_ALPHA_EXT:
1316 case GL_SRGB8:
1317 case GL_SRGB8_ALPHA8:
1318 return GL_SRGB;
1319 default:
1320 return GL_LINEAR;
1321 }
1322 }
1323
1312 void GLES2Util::GetColorFormatComponentSizes( 1324 void GLES2Util::GetColorFormatComponentSizes(
1313 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a) { 1325 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a) {
1314 DCHECK(r && g && b && a); 1326 DCHECK(r && g && b && a);
1315 *r = 0; 1327 *r = 0;
1316 *g = 0; 1328 *g = 0;
1317 *b = 0; 1329 *b = 0;
1318 *a = 0; 1330 *a = 0;
1319 1331
1320 switch (internal_format) { 1332 switch (internal_format) {
1321 case GL_LUMINANCE: 1333 case GL_LUMINANCE:
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 } 1964 }
1953 } 1965 }
1954 1966
1955 return true; 1967 return true;
1956 } 1968 }
1957 1969
1958 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1970 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1959 1971
1960 } // namespace gles2 1972 } // namespace gles2
1961 } // namespace gpu 1973 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698