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

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

Issue 2318313004: emulate srgb format for generateMipmap (Closed)
Patch Set: srgb-generateMipmap Created 4 years, 3 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 GLenum filter, 43 GLenum filter,
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 52
53 void InitializeSRGBEncoder(const gles2::GLES2Decoder* decoder);
54 bool srgb_encoder_initialized_ = false;
55 GLuint srgb_encoder_program_ = 0;
yunchao 2016/09/19 15:25:48 This code snippet is not necessary.
yizhou.jiang 2016/09/20 07:00:27 Done.
56
57 void SRGBGenerateMipmap(const gles2::GLES2Decoder* decoder,
58 Texture* tex,
59 GLenum target);
53 private: 60 private:
54 void InitializeSRGBConverterProgram(); 61 void InitializeSRGBConverterProgram();
55 scoped_refptr<const gles2::FeatureInfo> feature_info_; 62 scoped_refptr<const gles2::FeatureInfo> feature_info_;
56 63
57 bool srgb_converter_initialized_ = false; 64 bool srgb_converter_initialized_ = false;
58 65
59 GLuint srgb_converter_program_ = 0; 66 GLuint srgb_converter_program_ = 0;
60 67
61 std::array<GLuint, 2> srgb_converter_textures_ = {{0, 0}}; 68 std::array<GLuint, 2> srgb_converter_textures_ = {{0, 0}};
62 GLuint srgb_decoder_fbo_ = 0; 69 GLuint srgb_decoder_fbo_ = 0;
63 GLuint srgb_encoder_fbo_ = 0; 70 GLuint srgb_encoder_fbo_ = 0;
64 71
65 GLuint srgb_converter_vao_ = 0; 72 GLuint srgb_converter_vao_ = 0;
66 73
67 DISALLOW_COPY_AND_ASSIGN(SRGBConverter); 74 DISALLOW_COPY_AND_ASSIGN(SRGBConverter);
68 }; 75 };
69 76
70 } // namespace gles2. 77 } // namespace gles2.
71 } // namespace gpu. 78 } // namespace gpu.
72 79
73 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_ 80 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_SRGB_CONVERTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698