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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2817503002: Blink Rename follow-up: EXTsRGB should become _ext_srgb (not _ex_ts_rgb). (Closed)
Patch Set: Changed the spelling to ..._ext_srgb_... Created 3 years, 8 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 | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 generated_image_cache_(4), 1052 generated_image_cache_(4),
1053 synthesized_errors_to_console_(true), 1053 synthesized_errors_to_console_(true),
1054 num_gl_errors_to_console_allowed_(kMaxGLErrorsAllowedToConsole), 1054 num_gl_errors_to_console_allowed_(kMaxGLErrorsAllowedToConsole),
1055 one_plus_max_non_default_texture_unit_(0), 1055 one_plus_max_non_default_texture_unit_(0),
1056 is_web_gl2_formats_types_added_(false), 1056 is_web_gl2_formats_types_added_(false),
1057 is_web_gl2_tex_image_source_formats_types_added_(false), 1057 is_web_gl2_tex_image_source_formats_types_added_(false),
1058 is_web_gl2_internal_formats_copy_tex_image_added_(false), 1058 is_web_gl2_internal_formats_copy_tex_image_added_(false),
1059 is_oes_texture_float_formats_types_added_(false), 1059 is_oes_texture_float_formats_types_added_(false),
1060 is_oes_texture_half_float_formats_types_added_(false), 1060 is_oes_texture_half_float_formats_types_added_(false),
1061 is_web_gl_depth_texture_formats_types_added_(false), 1061 is_web_gl_depth_texture_formats_types_added_(false),
1062 is_ex_ts_rgb_formats_types_added_(false), 1062 is_ext_srgb_formats_types_added_(false),
1063 version_(version) { 1063 version_(version) {
1064 ASSERT(context_provider); 1064 ASSERT(context_provider);
1065 1065
1066 context_group_->AddContext(this); 1066 context_group_->AddContext(this);
1067 1067
1068 max_viewport_dims_[0] = max_viewport_dims_[1] = 0; 1068 max_viewport_dims_[0] = max_viewport_dims_[1] = 0;
1069 context_provider->ContextGL()->GetIntegerv(GL_MAX_VIEWPORT_DIMS, 1069 context_provider->ContextGL()->GetIntegerv(GL_MAX_VIEWPORT_DIMS,
1070 max_viewport_dims_); 1070 max_viewport_dims_);
1071 1071
1072 RefPtr<DrawingBuffer> buffer; 1072 RefPtr<DrawingBuffer> buffer;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1246
1247 for (int i = 0; i < kWebGLExtensionNameCount; ++i) 1247 for (int i = 0; i < kWebGLExtensionNameCount; ++i)
1248 extension_enabled_[i] = false; 1248 extension_enabled_[i] = false;
1249 1249
1250 is_web_gl2_formats_types_added_ = false; 1250 is_web_gl2_formats_types_added_ = false;
1251 is_web_gl2_tex_image_source_formats_types_added_ = false; 1251 is_web_gl2_tex_image_source_formats_types_added_ = false;
1252 is_web_gl2_internal_formats_copy_tex_image_added_ = false; 1252 is_web_gl2_internal_formats_copy_tex_image_added_ = false;
1253 is_oes_texture_float_formats_types_added_ = false; 1253 is_oes_texture_float_formats_types_added_ = false;
1254 is_oes_texture_half_float_formats_types_added_ = false; 1254 is_oes_texture_half_float_formats_types_added_ = false;
1255 is_web_gl_depth_texture_formats_types_added_ = false; 1255 is_web_gl_depth_texture_formats_types_added_ = false;
1256 is_ex_ts_rgb_formats_types_added_ = false; 1256 is_ext_srgb_formats_types_added_ = false;
1257 1257
1258 supported_internal_formats_.clear(); 1258 supported_internal_formats_.clear();
1259 ADD_VALUES_TO_SET(supported_internal_formats_, kSupportedFormatsES2); 1259 ADD_VALUES_TO_SET(supported_internal_formats_, kSupportedFormatsES2);
1260 supported_tex_image_source_internal_formats_.clear(); 1260 supported_tex_image_source_internal_formats_.clear();
1261 ADD_VALUES_TO_SET(supported_tex_image_source_internal_formats_, 1261 ADD_VALUES_TO_SET(supported_tex_image_source_internal_formats_,
1262 kSupportedFormatsES2); 1262 kSupportedFormatsES2);
1263 supported_internal_formats_copy_tex_image_.clear(); 1263 supported_internal_formats_copy_tex_image_.clear();
1264 ADD_VALUES_TO_SET(supported_internal_formats_copy_tex_image_, 1264 ADD_VALUES_TO_SET(supported_internal_formats_copy_tex_image_,
1265 kSupportedFormatsES2); 1265 kSupportedFormatsES2);
1266 supported_formats_.clear(); 1266 supported_formats_.clear();
(...skipping 5365 matching lines...) Expand 10 before | Expand all | Expand 10 after
6632 kSupportedInternalFormatsOESDepthTex); 6632 kSupportedInternalFormatsOESDepthTex);
6633 ADD_VALUES_TO_SET(supported_formats_, kSupportedFormatsOESDepthTex); 6633 ADD_VALUES_TO_SET(supported_formats_, kSupportedFormatsOESDepthTex);
6634 ADD_VALUES_TO_SET(supported_tex_image_source_formats_, 6634 ADD_VALUES_TO_SET(supported_tex_image_source_formats_,
6635 kSupportedFormatsOESDepthTex); 6635 kSupportedFormatsOESDepthTex);
6636 ADD_VALUES_TO_SET(supported_types_, kSupportedTypesOESDepthTex); 6636 ADD_VALUES_TO_SET(supported_types_, kSupportedTypesOESDepthTex);
6637 ADD_VALUES_TO_SET(supported_tex_image_source_types_, 6637 ADD_VALUES_TO_SET(supported_tex_image_source_types_,
6638 kSupportedTypesOESDepthTex); 6638 kSupportedTypesOESDepthTex);
6639 is_web_gl_depth_texture_formats_types_added_ = true; 6639 is_web_gl_depth_texture_formats_types_added_ = true;
6640 } 6640 }
6641 6641
6642 if (!is_ex_ts_rgb_formats_types_added_ && ExtensionEnabled(kEXTsRGBName)) { 6642 if (!is_ext_srgb_formats_types_added_ && ExtensionEnabled(kEXTsRGBName)) {
6643 ADD_VALUES_TO_SET(supported_internal_formats_, 6643 ADD_VALUES_TO_SET(supported_internal_formats_,
6644 kSupportedInternalFormatsEXTsRGB); 6644 kSupportedInternalFormatsEXTsRGB);
6645 ADD_VALUES_TO_SET(supported_tex_image_source_internal_formats_, 6645 ADD_VALUES_TO_SET(supported_tex_image_source_internal_formats_,
6646 kSupportedInternalFormatsEXTsRGB); 6646 kSupportedInternalFormatsEXTsRGB);
6647 ADD_VALUES_TO_SET(supported_formats_, kSupportedFormatsEXTsRGB); 6647 ADD_VALUES_TO_SET(supported_formats_, kSupportedFormatsEXTsRGB);
6648 ADD_VALUES_TO_SET(supported_tex_image_source_formats_, 6648 ADD_VALUES_TO_SET(supported_tex_image_source_formats_,
6649 kSupportedFormatsEXTsRGB); 6649 kSupportedFormatsEXTsRGB);
6650 is_ex_ts_rgb_formats_types_added_ = true; 6650 is_ext_srgb_formats_types_added_ = true;
6651 } 6651 }
6652 } 6652 }
6653 6653
6654 bool WebGLRenderingContextBase::ValidateTexImageSourceFormatAndType( 6654 bool WebGLRenderingContextBase::ValidateTexImageSourceFormatAndType(
6655 const char* function_name, 6655 const char* function_name,
6656 TexImageFunctionType function_type, 6656 TexImageFunctionType function_type,
6657 GLenum internalformat, 6657 GLenum internalformat,
6658 GLenum format, 6658 GLenum format,
6659 GLenum type) { 6659 GLenum type) {
6660 if (!is_web_gl2_tex_image_source_formats_types_added_ && IsWebGL2OrHigher()) { 6660 if (!is_web_gl2_tex_image_source_formats_types_added_ && IsWebGL2OrHigher()) {
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
7807 7807
7808 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7808 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7809 HTMLCanvasElementOrOffscreenCanvas& result) const { 7809 HTMLCanvasElementOrOffscreenCanvas& result) const {
7810 if (canvas()) 7810 if (canvas())
7811 result.setHTMLCanvasElement(canvas()); 7811 result.setHTMLCanvasElement(canvas());
7812 else 7812 else
7813 result.setOffscreenCanvas(offscreenCanvas()); 7813 result.setOffscreenCanvas(offscreenCanvas());
7814 } 7814 }
7815 7815
7816 } // namespace blink 7816 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698