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

Side by Side Diff: gpu/command_buffer/service/texture_manager.cc

Issue 1881883002: SRGB_EXT is a valid format of texture in WebGL1.0 and ES2.0 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address ken's comment: shrink the context range Created 4 years, 7 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 | « gpu/command_buffer/service/feature_info.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('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 "gpu/command_buffer/service/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 if (face_infos_.size() == 6 && !cube_complete_) 1585 if (face_infos_.size() == 6 && !cube_complete_)
1586 return false; 1586 return false;
1587 DCHECK(level >= 0 && 1587 DCHECK(level >= 0 &&
1588 level < static_cast<GLint>(face_infos_[0].level_infos.size())); 1588 level < static_cast<GLint>(face_infos_[0].level_infos.size()));
1589 GLenum internal_format = face_infos_[0].level_infos[level].internal_format; 1589 GLenum internal_format = face_infos_[0].level_infos[level].internal_format;
1590 bool color_renderable = 1590 bool color_renderable =
1591 ((feature_info->validators()->texture_unsized_internal_format. 1591 ((feature_info->validators()->texture_unsized_internal_format.
1592 IsValid(internal_format) && 1592 IsValid(internal_format) &&
1593 internal_format != GL_ALPHA && 1593 internal_format != GL_ALPHA &&
1594 internal_format != GL_LUMINANCE && 1594 internal_format != GL_LUMINANCE &&
1595 internal_format != GL_LUMINANCE_ALPHA) || 1595 internal_format != GL_LUMINANCE_ALPHA &&
1596 internal_format != GL_SRGB_EXT) ||
1596 feature_info->validators()-> 1597 feature_info->validators()->
1597 texture_sized_color_renderable_internal_format.IsValid( 1598 texture_sized_color_renderable_internal_format.IsValid(
1598 internal_format)); 1599 internal_format));
1599 bool depth_renderable = feature_info->validators()-> 1600 bool depth_renderable = feature_info->validators()->
1600 texture_depth_renderable_internal_format.IsValid(internal_format); 1601 texture_depth_renderable_internal_format.IsValid(internal_format);
1601 bool stencil_renderable = feature_info->validators()-> 1602 bool stencil_renderable = feature_info->validators()->
1602 texture_stencil_renderable_internal_format.IsValid(internal_format); 1603 texture_stencil_renderable_internal_format.IsValid(internal_format);
1603 return (color_renderable || depth_renderable || stencil_renderable); 1604 return (color_renderable || depth_renderable || stencil_renderable);
1604 } 1605 }
1605 1606
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 uint32_t TextureManager::GetServiceIdGeneration() const { 3173 uint32_t TextureManager::GetServiceIdGeneration() const {
3173 return current_service_id_generation_; 3174 return current_service_id_generation_;
3174 } 3175 }
3175 3176
3176 void TextureManager::IncrementServiceIdGeneration() { 3177 void TextureManager::IncrementServiceIdGeneration() {
3177 current_service_id_generation_++; 3178 current_service_id_generation_++;
3178 } 3179 }
3179 3180
3180 } // namespace gles2 3181 } // namespace gles2
3181 } // namespace gpu 3182 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698