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

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: SRGB_EXT is valid texture internal format, but not a color-renderable format Created 4 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
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 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 if (face_infos_.size() == 6 && !cube_complete_) 1551 if (face_infos_.size() == 6 && !cube_complete_)
1552 return false; 1552 return false;
1553 DCHECK(level >= 0 && 1553 DCHECK(level >= 0 &&
1554 level < static_cast<GLint>(face_infos_[0].level_infos.size())); 1554 level < static_cast<GLint>(face_infos_[0].level_infos.size()));
1555 GLenum internal_format = face_infos_[0].level_infos[level].internal_format; 1555 GLenum internal_format = face_infos_[0].level_infos[level].internal_format;
1556 bool color_renderable = 1556 bool color_renderable =
1557 ((feature_info->validators()->texture_unsized_internal_format. 1557 ((feature_info->validators()->texture_unsized_internal_format.
1558 IsValid(internal_format) && 1558 IsValid(internal_format) &&
1559 internal_format != GL_ALPHA && 1559 internal_format != GL_ALPHA &&
1560 internal_format != GL_LUMINANCE && 1560 internal_format != GL_LUMINANCE &&
1561 internal_format != GL_LUMINANCE_ALPHA) || 1561 internal_format != GL_LUMINANCE_ALPHA &&
1562 internal_format != GL_SRGB_EXT) ||
1562 feature_info->validators()-> 1563 feature_info->validators()->
1563 texture_sized_color_renderable_internal_format.IsValid( 1564 texture_sized_color_renderable_internal_format.IsValid(
1564 internal_format)); 1565 internal_format));
1565 bool depth_renderable = feature_info->validators()-> 1566 bool depth_renderable = feature_info->validators()->
1566 texture_depth_renderable_internal_format.IsValid(internal_format); 1567 texture_depth_renderable_internal_format.IsValid(internal_format);
1567 bool stencil_renderable = feature_info->validators()-> 1568 bool stencil_renderable = feature_info->validators()->
1568 texture_stencil_renderable_internal_format.IsValid(internal_format); 1569 texture_stencil_renderable_internal_format.IsValid(internal_format);
1569 return (color_renderable || depth_renderable || stencil_renderable); 1570 return (color_renderable || depth_renderable || stencil_renderable);
1570 } 1571 }
1571 1572
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 uint32_t TextureManager::GetServiceIdGeneration() const { 3135 uint32_t TextureManager::GetServiceIdGeneration() const {
3135 return current_service_id_generation_; 3136 return current_service_id_generation_;
3136 } 3137 }
3137 3138
3138 void TextureManager::IncrementServiceIdGeneration() { 3139 void TextureManager::IncrementServiceIdGeneration() {
3139 current_service_id_generation_++; 3140 current_service_id_generation_++;
3140 } 3141 }
3141 3142
3142 } // namespace gles2 3143 } // namespace gles2
3143 } // namespace gpu 3144 } // namespace gpu
OLDNEW
« gpu/command_buffer/service/feature_info.cc ('K') | « gpu/command_buffer/service/feature_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698