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

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

Issue 2543033002: Add texture swizzle back to command buffer. (Closed)
Patch Set: add swizzle value negative test Created 4 years 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/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 kTotalDrawBufferEnums - max_draw_buffers); 1484 kTotalDrawBufferEnums - max_draw_buffers);
1485 } 1485 }
1486 1486
1487 if (feature_flags_.ext_texture_format_bgra8888) { 1487 if (feature_flags_.ext_texture_format_bgra8888) {
1488 validators_.texture_internal_format.AddValue(GL_BGRA8_EXT); 1488 validators_.texture_internal_format.AddValue(GL_BGRA8_EXT);
1489 validators_.texture_sized_color_renderable_internal_format.AddValue( 1489 validators_.texture_sized_color_renderable_internal_format.AddValue(
1490 GL_BGRA8_EXT); 1490 GL_BGRA8_EXT);
1491 validators_.texture_sized_texture_filterable_internal_format.AddValue( 1491 validators_.texture_sized_texture_filterable_internal_format.AddValue(
1492 GL_BGRA8_EXT); 1492 GL_BGRA8_EXT);
1493 } 1493 }
1494
1495 if (!IsWebGLContext()) {
1496 validators_.texture_parameter.AddValue(GL_TEXTURE_SWIZZLE_R);
1497 validators_.texture_parameter.AddValue(GL_TEXTURE_SWIZZLE_G);
1498 validators_.texture_parameter.AddValue(GL_TEXTURE_SWIZZLE_B);
1499 validators_.texture_parameter.AddValue(GL_TEXTURE_SWIZZLE_A);
1500 }
1494 } 1501 }
1495 1502
1496 bool FeatureInfo::IsWebGLContext() const { 1503 bool FeatureInfo::IsWebGLContext() const {
1497 return IsWebGLContextType(context_type_); 1504 return IsWebGLContextType(context_type_);
1498 } 1505 }
1499 1506
1500 bool FeatureInfo::IsWebGL1OrES2Context() const { 1507 bool FeatureInfo::IsWebGL1OrES2Context() const {
1501 // Switch statement to cause a compile-time error if we miss a case. 1508 // Switch statement to cause a compile-time error if we miss a case.
1502 switch (context_type_) { 1509 switch (context_type_) {
1503 case CONTEXT_TYPE_WEBGL1: 1510 case CONTEXT_TYPE_WEBGL1:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 if (pos == std::string::npos) { 1546 if (pos == std::string::npos) {
1540 extensions_ += (extensions_.empty() ? "" : " ") + str; 1547 extensions_ += (extensions_.empty() ? "" : " ") + str;
1541 } 1548 }
1542 } 1549 }
1543 1550
1544 FeatureInfo::~FeatureInfo() { 1551 FeatureInfo::~FeatureInfo() {
1545 } 1552 }
1546 1553
1547 } // namespace gles2 1554 } // namespace gles2
1548 } // namespace gpu 1555 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698