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

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

Issue 2405893002: gpu, cmaa: reduce one-copy (Closed)
Patch Set: add helper comment 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/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMAA_I NTEL_H_
7 7
8 #include "gpu/command_buffer/service/gl_utils.h" 8 #include "gpu/command_buffer/service/gl_utils.h"
9 #include "gpu/gpu_export.h" 9 #include "gpu/gpu_export.h"
10 10
(...skipping 21 matching lines...) Expand all
32 void Initialize(gles2::GLES2Decoder* decoder); 32 void Initialize(gles2::GLES2Decoder* decoder);
33 void Destroy(); 33 void Destroy();
34 34
35 // Applies the algorithm to the color attachments of the currently bound draw 35 // Applies the algorithm to the color attachments of the currently bound draw
36 // framebuffer. 36 // framebuffer.
37 void ApplyFramebufferAttachmentCMAAINTEL(gles2::GLES2Decoder* decoder, 37 void ApplyFramebufferAttachmentCMAAINTEL(gles2::GLES2Decoder* decoder,
38 gles2::Framebuffer* framebuffer); 38 gles2::Framebuffer* framebuffer);
39 39
40 private: 40 private:
41 // Applies the CMAA algorithm to a texture. 41 // Applies the CMAA algorithm to a texture.
42 void ApplyCMAAEffectTexture(GLuint source_texture, GLuint dest_texture); 42 void ApplyCMAAEffectTexture(GLuint source_texture,
43 GLuint dest_texture,
44 bool do_copy);
43 45
44 void OnSize(GLint width, GLint height); 46 void OnSize(GLint width, GLint height);
45 void ReleaseTextures(); 47 void ReleaseTextures();
46 48
47 void CopyTexture(GLint dest); 49 void CopyTexture(GLint dest);
48 GLuint CreateProgram(const char* defines, 50 GLuint CreateProgram(const char* defines,
49 const char* vs_source, 51 const char* vs_source,
50 const char* fs_source); 52 const char* fs_source);
51 GLuint CreateShader(GLenum type, const char* defines, const char* source); 53 GLuint CreateShader(GLenum type, const char* defines, const char* source);
52 54
(...skipping 19 matching lines...) Expand all
72 GLuint cmaa_framebuffer_; 74 GLuint cmaa_framebuffer_;
73 GLuint copy_framebuffer_; 75 GLuint copy_framebuffer_;
74 76
75 GLuint rgba8_texture_; 77 GLuint rgba8_texture_;
76 GLuint working_color_texture_; 78 GLuint working_color_texture_;
77 GLuint edges0_texture_; 79 GLuint edges0_texture_;
78 GLuint edges1_texture_; 80 GLuint edges1_texture_;
79 GLuint mini4_edge_texture_; 81 GLuint mini4_edge_texture_;
80 GLuint mini4_edge_depth_texture_; 82 GLuint mini4_edge_depth_texture_;
81 83
82 GLuint edges1_shader_result_texture_float4_slot1_; 84 GLuint edges0_shader_result_rgba_texture_slot1_;
83 GLuint edges1_shader_result_texture_; 85 GLuint edges0_shader_target_texture_slot2_;
84 GLuint edges_combine_shader_result_texture_float4_slot1_; 86 GLuint edges1_shader_result_edge_texture_;
85 GLuint process_and_apply_shader_result_texture_float4_slot1_; 87 GLuint process_and_apply_shader_result_rgba_texture_slot1_;
86 GLuint edges_combine_shader_result_texture_slot2_; 88 GLuint edges_combine_shader_result_edge_texture_;
87 89
88 static const char vert_str_[]; 90 static const char vert_str_[];
89 static const char cmaa_frag_s1_[]; 91 static const char cmaa_frag_s1_[];
90 static const char cmaa_frag_s2_[]; 92 static const char cmaa_frag_s2_[];
91 93
92 DISALLOW_COPY_AND_ASSIGN(ApplyFramebufferAttachmentCMAAINTELResourceManager); 94 DISALLOW_COPY_AND_ASSIGN(ApplyFramebufferAttachmentCMAAINTELResourceManager);
93 }; 95 };
94 96
95 } // namespace gles2 97 } // namespace gles2
96 } // namespace gpu 98 } // namespace gpu
97 99
98 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMA A_INTEL_H_ 100 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_APPLY_FRAMEBUFFER_ATTACHMENT_CMA A_INTEL_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698