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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_srgb_converter.h

Issue 2318313004: emulate srgb format for generateMipmap (Closed)
Patch Set: rebase code 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
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_
7 7
8 #include <array> 8 #include <array>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const gfx::Size& framebuffer_size, 44 const gfx::Size& framebuffer_size,
45 GLuint src_framebuffer, 45 GLuint src_framebuffer,
46 GLenum src_framebuffer_internal_format, 46 GLenum src_framebuffer_internal_format,
47 GLenum src_framebuffer_format, 47 GLenum src_framebuffer_format,
48 GLenum src_framebuffer_type, 48 GLenum src_framebuffer_type,
49 GLuint dst_framebuffer, 49 GLuint dst_framebuffer,
50 bool decode, 50 bool decode,
51 bool encode, 51 bool encode,
52 bool enable_scissor_test); 52 bool enable_scissor_test);
53 53
54 void GenerateMipmap(const gles2::GLES2Decoder* decoder,
55 Texture* tex,
56 GLenum target);
57
54 private: 58 private:
55 void InitializeSRGBConverterProgram(); 59 void InitializeSRGBConverterProgram();
56 scoped_refptr<const gles2::FeatureInfo> feature_info_; 60 scoped_refptr<const gles2::FeatureInfo> feature_info_;
57 61
58 bool srgb_converter_initialized_ = false; 62 bool srgb_converter_initialized_ = false;
59 63
60 GLuint srgb_converter_program_ = 0; 64 GLuint srgb_converter_program_ = 0;
61 65
62 std::array<GLuint, 2> srgb_converter_textures_ = {{0, 0}}; 66 std::array<GLuint, 2> srgb_converter_textures_ = {{0, 0}};
63 GLuint srgb_decoder_fbo_ = 0; 67 GLuint srgb_decoder_fbo_ = 0;
64 GLuint srgb_encoder_fbo_ = 0; 68 GLuint srgb_encoder_fbo_ = 0;
65 69
66 GLuint srgb_converter_vao_ = 0; 70 GLuint srgb_converter_vao_ = 0;
67 71
68 DISALLOW_COPY_AND_ASSIGN(SRGBConverter); 72 DISALLOW_COPY_AND_ASSIGN(SRGBConverter);
69 }; 73 };
70 74
71 } // namespace gles2. 75 } // namespace gles2.
72 } // namespace gpu. 76 } // namespace gpu.
73 77
74 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_ 78 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_srgb_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698