OLD | NEW |
---|---|
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 16700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16711 LOCAL_SET_GL_ERROR( | 16711 LOCAL_SET_GL_ERROR( |
16712 GL_INVALID_OPERATION, | 16712 GL_INVALID_OPERATION, |
16713 "glCreateAndConsumeTextureCHROMIUM", "invalid target"); | 16713 "glCreateAndConsumeTextureCHROMIUM", "invalid target"); |
16714 return; | 16714 return; |
16715 } | 16715 } |
16716 | 16716 |
16717 texture_ref = texture_manager()->Consume(client_id, texture); | 16717 texture_ref = texture_manager()->Consume(client_id, texture); |
16718 } | 16718 } |
16719 | 16719 |
16720 void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { | 16720 void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { |
16721 Framebuffer* bound_framebuffer = | |
16722 GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER); | |
16723 if (!bound_framebuffer) { | |
16724 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, | |
16725 "glApplyScreenSpaceAntialiasingCHROMIUM", | |
16726 "no bound framebuffer object"); | |
16727 return; | |
16728 } | |
piman
2016/10/20 18:36:17
Can you update gpu/GLES2/extensions/CHROMIUM/CHROM
dshwang
2016/10/20 19:12:18
good question.
https://cs.chromium.org/chromium/s
| |
16729 | |
16721 // Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the | 16730 // Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the |
16722 // color attachments of currently bound draw framebuffer. | 16731 // color attachments of currently bound draw framebuffer. |
16723 // Reference GL_INTEL_framebuffer_CMAA for details. | 16732 // Reference GL_INTEL_framebuffer_CMAA for details. |
16724 // Use platform version if available. | 16733 // Use platform version if available. |
16725 if (!feature_info_->feature_flags() | 16734 if (!feature_info_->feature_flags() |
16726 .use_chromium_screen_space_antialiasing_via_shaders) { | 16735 .use_chromium_screen_space_antialiasing_via_shaders) { |
16727 glApplyFramebufferAttachmentCMAAINTEL(); | 16736 glApplyFramebufferAttachmentCMAAINTEL(); |
16728 } else { | 16737 } else { |
16729 // Defer initializing the CopyTextureCHROMIUMResourceManager until it is | 16738 // Defer initializing the CopyTextureCHROMIUMResourceManager until it is |
16730 // needed because it takes ??s of milliseconds to initialize. | 16739 // needed because it takes ??s of milliseconds to initialize. |
16731 if (!apply_framebuffer_attachment_cmaa_intel_.get()) { | 16740 if (!apply_framebuffer_attachment_cmaa_intel_.get()) { |
16732 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER( | 16741 LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER( |
16733 "glApplyFramebufferAttachmentCMAAINTEL"); | 16742 "glApplyFramebufferAttachmentCMAAINTEL"); |
16734 apply_framebuffer_attachment_cmaa_intel_.reset( | 16743 apply_framebuffer_attachment_cmaa_intel_.reset( |
16735 new ApplyFramebufferAttachmentCMAAINTELResourceManager()); | 16744 new ApplyFramebufferAttachmentCMAAINTELResourceManager()); |
16736 apply_framebuffer_attachment_cmaa_intel_->Initialize(this); | 16745 apply_framebuffer_attachment_cmaa_intel_->Initialize(this); |
16737 RestoreCurrentFramebufferBindings(); | 16746 RestoreCurrentFramebufferBindings(); |
16738 if (LOCAL_PEEK_GL_ERROR("glApplyFramebufferAttachmentCMAAINTEL") != | 16747 if (LOCAL_PEEK_GL_ERROR("glApplyFramebufferAttachmentCMAAINTEL") != |
16739 GL_NO_ERROR) | 16748 GL_NO_ERROR) |
16740 return; | 16749 return; |
16741 } | 16750 } |
16742 apply_framebuffer_attachment_cmaa_intel_ | 16751 apply_framebuffer_attachment_cmaa_intel_ |
16743 ->ApplyFramebufferAttachmentCMAAINTEL( | 16752 ->ApplyFramebufferAttachmentCMAAINTEL(this, bound_framebuffer); |
16744 this, GetFramebufferInfoForTarget(GL_DRAW_FRAMEBUFFER)); | |
16745 } | 16753 } |
16746 } | 16754 } |
16747 | 16755 |
16748 void GLES2DecoderImpl::DoInsertEventMarkerEXT( | 16756 void GLES2DecoderImpl::DoInsertEventMarkerEXT( |
16749 GLsizei length, const GLchar* marker) { | 16757 GLsizei length, const GLchar* marker) { |
16750 if (!marker) { | 16758 if (!marker) { |
16751 marker = ""; | 16759 marker = ""; |
16752 } | 16760 } |
16753 debug_marker_manager_.SetMarker( | 16761 debug_marker_manager_.SetMarker( |
16754 length ? std::string(marker, length) : std::string(marker)); | 16762 length ? std::string(marker, length) : std::string(marker)); |
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
18607 } | 18615 } |
18608 | 18616 |
18609 // Include the auto-generated part of this file. We split this because it means | 18617 // Include the auto-generated part of this file. We split this because it means |
18610 // we can easily edit the non-auto generated parts right here in this file | 18618 // we can easily edit the non-auto generated parts right here in this file |
18611 // instead of having to edit some template or the code generator. | 18619 // instead of having to edit some template or the code generator. |
18612 #include "base/macros.h" | 18620 #include "base/macros.h" |
18613 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18621 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
18614 | 18622 |
18615 } // namespace gles2 | 18623 } // namespace gles2 |
18616 } // namespace gpu | 18624 } // namespace gpu |
OLD | NEW |