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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1298523003: Add GL_CHROMIUM_screen_space_antialiasing to support alternative AA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit Created 5 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) 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 void DoProduceTextureCHROMIUM(GLenum target, const GLbyte* key); 1053 void DoProduceTextureCHROMIUM(GLenum target, const GLbyte* key);
1054 void DoProduceTextureDirectCHROMIUM(GLuint texture, GLenum target, 1054 void DoProduceTextureDirectCHROMIUM(GLuint texture, GLenum target,
1055 const GLbyte* key); 1055 const GLbyte* key);
1056 void ProduceTextureRef(std::string func_name, TextureRef* texture_ref, 1056 void ProduceTextureRef(std::string func_name, TextureRef* texture_ref,
1057 GLenum target, const GLbyte* data); 1057 GLenum target, const GLbyte* data);
1058 1058
1059 void EnsureTextureForClientId(GLenum target, GLuint client_id); 1059 void EnsureTextureForClientId(GLenum target, GLuint client_id);
1060 void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key); 1060 void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key);
1061 void DoCreateAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* key, 1061 void DoCreateAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* key,
1062 GLuint client_id); 1062 GLuint client_id);
1063 void DoApplyScreenSpaceAntialiasingCHROMIUM();
1063 1064
1064 bool DoIsValuebufferCHROMIUM(GLuint client_id); 1065 bool DoIsValuebufferCHROMIUM(GLuint client_id);
1065 void DoBindValueBufferCHROMIUM(GLenum target, GLuint valuebuffer); 1066 void DoBindValueBufferCHROMIUM(GLenum target, GLuint valuebuffer);
1066 void DoSubscribeValueCHROMIUM(GLenum target, GLenum subscription); 1067 void DoSubscribeValueCHROMIUM(GLenum target, GLenum subscription);
1067 void DoPopulateSubscribedValuesCHROMIUM(GLenum target); 1068 void DoPopulateSubscribedValuesCHROMIUM(GLenum target);
1068 void DoUniformValueBufferCHROMIUM(GLint location, 1069 void DoUniformValueBufferCHROMIUM(GLint location,
1069 GLenum target, 1070 GLenum target,
1070 GLenum subscription); 1071 GLenum subscription);
1071 1072
1072 void DoBindTexImage2DCHROMIUM( 1073 void DoBindTexImage2DCHROMIUM(
(...skipping 12767 matching lines...) Expand 10 before | Expand all | Expand 10 after
13840 EnsureTextureForClientId(target, client_id); 13841 EnsureTextureForClientId(target, client_id);
13841 LOCAL_SET_GL_ERROR( 13842 LOCAL_SET_GL_ERROR(
13842 GL_INVALID_OPERATION, 13843 GL_INVALID_OPERATION,
13843 "glCreateAndConsumeTextureCHROMIUM", "invalid target"); 13844 "glCreateAndConsumeTextureCHROMIUM", "invalid target");
13844 return; 13845 return;
13845 } 13846 }
13846 13847
13847 texture_ref = texture_manager()->Consume(client_id, texture); 13848 texture_ref = texture_manager()->Consume(client_id, texture);
13848 } 13849 }
13849 13850
13851 void GLES2DecoderImpl::DoApplyScreenSpaceAntialiasingCHROMIUM() {
13852 // Apply CMAA(Conservative Morphological Anti-Aliasing) algorithm to the
13853 // color attachments of currently bound draw framebuffer.
13854 // Reference GL_INTEL_framebuffer_CMAA for details.
13855 glApplyFramebufferAttachmentCMAAINTEL();
13856 }
13857
13850 bool GLES2DecoderImpl::DoIsValuebufferCHROMIUM(GLuint client_id) { 13858 bool GLES2DecoderImpl::DoIsValuebufferCHROMIUM(GLuint client_id) {
13851 const Valuebuffer* valuebuffer = GetValuebuffer(client_id); 13859 const Valuebuffer* valuebuffer = GetValuebuffer(client_id);
13852 return valuebuffer && valuebuffer->IsValid(); 13860 return valuebuffer && valuebuffer->IsValid();
13853 } 13861 }
13854 13862
13855 void GLES2DecoderImpl::DoBindValueBufferCHROMIUM(GLenum target, 13863 void GLES2DecoderImpl::DoBindValueBufferCHROMIUM(GLenum target,
13856 GLuint client_id) { 13864 GLuint client_id) {
13857 Valuebuffer* valuebuffer = NULL; 13865 Valuebuffer* valuebuffer = NULL;
13858 if (client_id != 0) { 13866 if (client_id != 0) {
13859 valuebuffer = GetValuebuffer(client_id); 13867 valuebuffer = GetValuebuffer(client_id);
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
14861 return error::kNoError; 14869 return error::kNoError;
14862 } 14870 }
14863 14871
14864 // Include the auto-generated part of this file. We split this because it means 14872 // Include the auto-generated part of this file. We split this because it means
14865 // we can easily edit the non-auto generated parts right here in this file 14873 // we can easily edit the non-auto generated parts right here in this file
14866 // instead of having to edit some template or the code generator. 14874 // instead of having to edit some template or the code generator.
14867 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 14875 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
14868 14876
14869 } // namespace gles2 14877 } // namespace gles2
14870 } // namespace gpu 14878 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698