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

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

Issue 2389363002: Move special DEPTH_STENCIL attachment logic from command buffers to WebGL1 (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | gpu/command_buffer/service/context_group.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 // 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 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 } 1434 }
1435 1435
1436 uint32_t GLES2Util::GetChannelsNeededForAttachmentType( 1436 uint32_t GLES2Util::GetChannelsNeededForAttachmentType(
1437 int type, 1437 int type,
1438 uint32_t max_color_attachments) { 1438 uint32_t max_color_attachments) {
1439 switch (type) { 1439 switch (type) {
1440 case GL_DEPTH_ATTACHMENT: 1440 case GL_DEPTH_ATTACHMENT:
1441 return kDepth; 1441 return kDepth;
1442 case GL_STENCIL_ATTACHMENT: 1442 case GL_STENCIL_ATTACHMENT:
1443 return kStencil; 1443 return kStencil;
1444 case GL_DEPTH_STENCIL_ATTACHMENT:
1445 return kDepth | kStencil;
1446 default: 1444 default:
1447 if (type >= GL_COLOR_ATTACHMENT0 && 1445 if (type >= GL_COLOR_ATTACHMENT0 &&
1448 type < static_cast<int>( 1446 type < static_cast<int>(
1449 GL_COLOR_ATTACHMENT0 + max_color_attachments)) { 1447 GL_COLOR_ATTACHMENT0 + max_color_attachments)) {
1450 return kRGBA; 1448 return kRGBA;
1451 } 1449 }
1452 return 0x0000; 1450 return 0x0000;
1453 } 1451 }
1454 } 1452 }
1455 1453
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1874 }
1877 1875
1878 return true; 1876 return true;
1879 } 1877 }
1880 1878
1881 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1879 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1882 1880
1883 } // namespace gles2 1881 } // namespace gles2
1884 } // namespace gpu 1882 } // namespace gpu
1885 1883
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698