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 <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1085 void DoProduceTextureCHROMIUM(GLenum target, const GLbyte* key); | 1085 void DoProduceTextureCHROMIUM(GLenum target, const GLbyte* key); |
1086 void DoProduceTextureDirectCHROMIUM(GLuint texture, GLenum target, | 1086 void DoProduceTextureDirectCHROMIUM(GLuint texture, GLenum target, |
1087 const GLbyte* key); | 1087 const GLbyte* key); |
1088 void ProduceTextureRef(std::string func_name, TextureRef* texture_ref, | 1088 void ProduceTextureRef(std::string func_name, TextureRef* texture_ref, |
1089 GLenum target, const GLbyte* data); | 1089 GLenum target, const GLbyte* data); |
1090 | 1090 |
1091 void EnsureTextureForClientId(GLenum target, GLuint client_id); | 1091 void EnsureTextureForClientId(GLenum target, GLuint client_id); |
1092 void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key); | 1092 void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key); |
1093 void DoCreateAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* key, | 1093 void DoCreateAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* key, |
1094 GLuint client_id); | 1094 GLuint client_id); |
1095 void DoApplyScreenSpaceAntialiasingCHROMIUM(); | |
1095 | 1096 |
1096 bool DoIsValuebufferCHROMIUM(GLuint client_id); | 1097 bool DoIsValuebufferCHROMIUM(GLuint client_id); |
1097 void DoBindValueBufferCHROMIUM(GLenum target, GLuint valuebuffer); | 1098 void DoBindValueBufferCHROMIUM(GLenum target, GLuint valuebuffer); |
1098 void DoSubscribeValueCHROMIUM(GLenum target, GLenum subscription); | 1099 void DoSubscribeValueCHROMIUM(GLenum target, GLenum subscription); |
1099 void DoPopulateSubscribedValuesCHROMIUM(GLenum target); | 1100 void DoPopulateSubscribedValuesCHROMIUM(GLenum target); |
1100 void DoUniformValueBufferCHROMIUM(GLint location, | 1101 void DoUniformValueBufferCHROMIUM(GLint location, |
1101 GLenum target, | 1102 GLenum target, |
1102 GLenum subscription); | 1103 GLenum subscription); |
1103 | 1104 |
1104 void DoBindTexImage2DCHROMIUM( | 1105 void DoBindTexImage2DCHROMIUM( |
(...skipping 12351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13456 EnsureTextureForClientId(target, client_id); | 13457 EnsureTextureForClientId(target, client_id); |
13457 LOCAL_SET_GL_ERROR( | 13458 LOCAL_SET_GL_ERROR( |
13458 GL_INVALID_OPERATION, | 13459 GL_INVALID_OPERATION, |
13459 "glCreateAndConsumeTextureCHROMIUM", "invalid target"); | 13460 "glCreateAndConsumeTextureCHROMIUM", "invalid target"); |
13460 return; | 13461 return; |
13461 } | 13462 } |
13462 | 13463 |
13463 texture_ref = texture_manager()->Consume(client_id, texture); | 13464 texture_ref = texture_manager()->Consume(client_id, texture); |
13464 } | 13465 } |
13465 | 13466 |
13467 void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() { | |
13468 // Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the | |
13469 // color attachments of currently bound draw framebuffer. | |
13470 // Reference GL_INTEL_framebuffer_CMAA for details. | |
13471 glApplyFramebufferAttachmentCMAAINTEL(); | |
piman
2015/09/09 01:37:51
nit: indent looks wrong. Apply 'git cl format' ?
| |
13472 } | |
13473 | |
13466 bool GLES2DecoderImpl::DoIsValuebufferCHROMIUM(GLuint client_id) { | 13474 bool GLES2DecoderImpl::DoIsValuebufferCHROMIUM(GLuint client_id) { |
13467 const Valuebuffer* valuebuffer = GetValuebuffer(client_id); | 13475 const Valuebuffer* valuebuffer = GetValuebuffer(client_id); |
13468 return valuebuffer && valuebuffer->IsValid(); | 13476 return valuebuffer && valuebuffer->IsValid(); |
13469 } | 13477 } |
13470 | 13478 |
13471 void GLES2DecoderImpl::DoBindValueBufferCHROMIUM(GLenum target, | 13479 void GLES2DecoderImpl::DoBindValueBufferCHROMIUM(GLenum target, |
13472 GLuint client_id) { | 13480 GLuint client_id) { |
13473 Valuebuffer* valuebuffer = NULL; | 13481 Valuebuffer* valuebuffer = NULL; |
13474 if (client_id != 0) { | 13482 if (client_id != 0) { |
13475 valuebuffer = GetValuebuffer(client_id); | 13483 valuebuffer = GetValuebuffer(client_id); |
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
14783 return error::kNoError; | 14791 return error::kNoError; |
14784 } | 14792 } |
14785 | 14793 |
14786 // Include the auto-generated part of this file. We split this because it means | 14794 // Include the auto-generated part of this file. We split this because it means |
14787 // we can easily edit the non-auto generated parts right here in this file | 14795 // we can easily edit the non-auto generated parts right here in this file |
14788 // instead of having to edit some template or the code generator. | 14796 // instead of having to edit some template or the code generator. |
14789 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 14797 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
14790 | 14798 |
14791 } // namespace gles2 | 14799 } // namespace gles2 |
14792 } // namespace gpu | 14800 } // namespace gpu |
OLD | NEW |