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

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

Issue 2374123002: ReadPixels with GL_HALF_FLOAT_OES when targetting all versions of ES. (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 | « content/test/gpu/gpu_tests/webgl_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 10850 matching lines...) Expand 10 before | Expand all | Expand 10 after
10861 if (format == static_cast<GLenum>(preferred_format) && 10861 if (format == static_cast<GLenum>(preferred_format) &&
10862 type == static_cast<GLenum>(preferred_type)) { 10862 type == static_cast<GLenum>(preferred_type)) {
10863 format_type_acceptable = true; 10863 format_type_acceptable = true;
10864 } 10864 }
10865 } 10865 }
10866 if (!format_type_acceptable) { 10866 if (!format_type_acceptable) {
10867 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glReadPixels", 10867 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glReadPixels",
10868 "format and type incompatible with the current read framebuffer"); 10868 "format and type incompatible with the current read framebuffer");
10869 return error::kNoError; 10869 return error::kNoError;
10870 } 10870 }
10871 if (type == GL_HALF_FLOAT_OES && !gl_version_info().is_es2) { 10871 if (type == GL_HALF_FLOAT_OES && !gl_version_info().is_es) {
10872 type = GL_HALF_FLOAT; 10872 type = GL_HALF_FLOAT;
10873 } 10873 }
10874 if (width == 0 || height == 0) { 10874 if (width == 0 || height == 0) {
10875 return error::kNoError; 10875 return error::kNoError;
10876 } 10876 }
10877 10877
10878 // Get the size of the current fbo or backbuffer. 10878 // Get the size of the current fbo or backbuffer.
10879 gfx::Size max_size = GetBoundReadFramebufferSize(); 10879 gfx::Size max_size = GetBoundReadFramebufferSize();
10880 10880
10881 int32_t max_x; 10881 int32_t max_x;
(...skipping 7201 matching lines...) Expand 10 before | Expand all | Expand 10 after
18083 } 18083 }
18084 18084
18085 // Include the auto-generated part of this file. We split this because it means 18085 // Include the auto-generated part of this file. We split this because it means
18086 // we can easily edit the non-auto generated parts right here in this file 18086 // we can easily edit the non-auto generated parts right here in this file
18087 // instead of having to edit some template or the code generator. 18087 // instead of having to edit some template or the code generator.
18088 #include "base/macros.h" 18088 #include "base/macros.h"
18089 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18089 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18090 18090
18091 } // namespace gles2 18091 } // namespace gles2
18092 } // namespace gpu 18092 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698