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

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

Issue 2444803002: [Not For Revew] reverse src/dst coordinates if both src and dst coordinates are reversed
Patch Set: suppress the webgl2 conformance expectations Created 4 years, 1 month 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 | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('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 // 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/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 8052 matching lines...) Expand 10 before | Expand all | Expand 10 after
8063 srcY1 = srcY0 < srcY1 ? 8063 srcY1 = srcY0 < srcY1 ?
8064 src_bounds.y() + src_bounds.height() : src_bounds.y(); 8064 src_bounds.y() + src_bounds.height() : src_bounds.y();
8065 8065
8066 dstX0 = dstX0 < dstX1 ? dst_mapping_x0 : dst_mapping_x1; 8066 dstX0 = dstX0 < dstX1 ? dst_mapping_x0 : dst_mapping_x1;
8067 dstY0 = dstY0 < dstY1 ? dst_mapping_y0 : dst_mapping_y1; 8067 dstY0 = dstY0 < dstY1 ? dst_mapping_y0 : dst_mapping_y1;
8068 dstX1 = dstX0 < dstX1 ? dst_mapping_x1 : dst_mapping_x0; 8068 dstX1 = dstX0 < dstX1 ? dst_mapping_x1 : dst_mapping_x0;
8069 dstY1 = dstY0 < dstY1 ? dst_mapping_y1 : dst_mapping_y0; 8069 dstY1 = dstY0 < dstY1 ? dst_mapping_y1 : dst_mapping_y0;
8070 } 8070 }
8071 } 8071 }
8072 8072
8073 if (srcX0 > srcX1 && dstX0 > dstX1) {
8074 GLint temp;
8075 temp = srcX1, srcX1 = srcX0, srcX0 = temp;
8076 temp = dstX1, dstX1 = dstX0, dstX0 = temp;
8077 }
8078
8079 if (srcY0 > srcY1 && dstY0 > dstY1) {
8080 GLint temp;
8081 temp = srcY1, srcY1 = srcY0, srcY0 = temp;
8082 temp = dstY1, dstY1 = dstY0, dstY0 = temp;
8083 }
8084
8073 bool enable_srgb = 8085 bool enable_srgb =
8074 (read_buffer_has_srgb || draw_buffers_has_srgb) && 8086 (read_buffer_has_srgb || draw_buffers_has_srgb) &&
8075 ((mask & GL_COLOR_BUFFER_BIT) != 0); 8087 ((mask & GL_COLOR_BUFFER_BIT) != 0);
8076 bool encode_srgb_only = 8088 bool encode_srgb_only =
8077 (draw_buffers_has_srgb && !read_buffer_has_srgb) && 8089 (draw_buffers_has_srgb && !read_buffer_has_srgb) &&
8078 ((mask & GL_COLOR_BUFFER_BIT) != 0); 8090 ((mask & GL_COLOR_BUFFER_BIT) != 0);
8079 if (!enable_srgb || 8091 if (!enable_srgb ||
8080 read_buffer_samples > 0 || 8092 read_buffer_samples > 0 ||
8081 !feature_info_->feature_flags().desktop_srgb_support || 8093 !feature_info_->feature_flags().desktop_srgb_support ||
8082 gl_version_info().IsAtLeastGL(4, 4) || 8094 gl_version_info().IsAtLeastGL(4, 4) ||
(...skipping 10677 matching lines...) Expand 10 before | Expand all | Expand 10 after
18760 } 18772 }
18761 18773
18762 // Include the auto-generated part of this file. We split this because it means 18774 // Include the auto-generated part of this file. We split this because it means
18763 // we can easily edit the non-auto generated parts right here in this file 18775 // we can easily edit the non-auto generated parts right here in this file
18764 // instead of having to edit some template or the code generator. 18776 // instead of having to edit some template or the code generator.
18765 #include "base/macros.h" 18777 #include "base/macros.h"
18766 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18778 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18767 18779
18768 } // namespace gles2 18780 } // namespace gles2
18769 } // namespace gpu 18781 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698