| OLD | NEW |
| 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 #include "gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa
_intel.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_apply_framebuffer_attachment_cmaa
_intel.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "gpu/command_buffer/service/framebuffer_manager.h" | 8 #include "gpu/command_buffer/service/framebuffer_manager.h" |
| 9 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" |
| 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // CMAA internally expects GL_RGBA8 textures. | 242 // CMAA internally expects GL_RGBA8 textures. |
| 243 // Process using a GL_RGBA8 copy if this is not the case. | 243 // Process using a GL_RGBA8 copy if this is not the case. |
| 244 bool do_copy = internal_format != GL_RGBA8; | 244 bool do_copy = internal_format != GL_RGBA8; |
| 245 | 245 |
| 246 // CMAA Effect | 246 // CMAA Effect |
| 247 if (do_copy) { | 247 if (do_copy) { |
| 248 ApplyCMAAEffectTexture(source_texture, rgba8_texture_, do_copy); | 248 ApplyCMAAEffectTexture(source_texture, rgba8_texture_, do_copy); |
| 249 | 249 |
| 250 copier->DoCopySubTexture( | 250 copier->DoCopySubTexture( |
| 251 decoder, GL_TEXTURE_2D, rgba8_texture_, GL_RGBA8, GL_TEXTURE_2D, | 251 decoder, GL_TEXTURE_2D, rgba8_texture_, 0, GL_RGBA8, GL_TEXTURE_2D, |
| 252 source_texture, internal_format, 0, 0, 0, 0, width_, height_, | 252 source_texture, 0, internal_format, 0, 0, 0, 0, width_, height_, |
| 253 width_, height_, width_, height_, false, false, false, DIRECT_DRAW); | 253 width_, height_, width_, height_, false, false, false, DIRECT_DRAW); |
| 254 } else { | 254 } else { |
| 255 ApplyCMAAEffectTexture(source_texture, source_texture, do_copy); | 255 ApplyCMAAEffectTexture(source_texture, source_texture, do_copy); |
| 256 } | 256 } |
| 257 | 257 |
| 258 decoder->RestoreTextureState(source_texture); | 258 decoder->RestoreTextureState(source_texture); |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 | 261 |
| 262 // Restore state | 262 // Restore state |
| (...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 \n#endif\n | 1841 \n#endif\n |
| 1842 \n#if defined DISPLAY_EDGES\n | 1842 \n#if defined DISPLAY_EDGES\n |
| 1843 DisplayEdges(); | 1843 DisplayEdges(); |
| 1844 \n#endif\n | 1844 \n#endif\n |
| 1845 } | 1845 } |
| 1846 ); | 1846 ); |
| 1847 /* clang-format on */ | 1847 /* clang-format on */ |
| 1848 | 1848 |
| 1849 } // namespace gles2 | 1849 } // namespace gles2 |
| 1850 } // namespace gpu | 1850 } // namespace gpu |
| OLD | NEW |