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 <list> | 10 #include <list> |
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 ref = texture_manager()->GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP); | 2200 ref = texture_manager()->GetDefaultTextureInfo(GL_TEXTURE_CUBE_MAP); |
2201 state_.texture_units[tt].bound_texture_cube_map = ref; | 2201 state_.texture_units[tt].bound_texture_cube_map = ref; |
2202 glBindTexture(GL_TEXTURE_CUBE_MAP, ref->service_id()); | 2202 glBindTexture(GL_TEXTURE_CUBE_MAP, ref->service_id()); |
2203 ref = texture_manager()->GetDefaultTextureInfo(GL_TEXTURE_2D); | 2203 ref = texture_manager()->GetDefaultTextureInfo(GL_TEXTURE_2D); |
2204 state_.texture_units[tt].bound_texture_2d = ref; | 2204 state_.texture_units[tt].bound_texture_2d = ref; |
2205 glBindTexture(GL_TEXTURE_2D, ref->service_id()); | 2205 glBindTexture(GL_TEXTURE_2D, ref->service_id()); |
2206 } | 2206 } |
2207 glActiveTexture(GL_TEXTURE0); | 2207 glActiveTexture(GL_TEXTURE0); |
2208 CHECK_GL_ERROR(); | 2208 CHECK_GL_ERROR(); |
2209 | 2209 |
2210 ContextCreationAttribParser attrib_parser; | 2210 ContextCreationAttribHelper attrib_parser; |
2211 if (!attrib_parser.Parse(attribs)) | 2211 if (!attrib_parser.Parse(attribs)) |
2212 return false; | 2212 return false; |
2213 | 2213 |
2214 if (offscreen) { | 2214 if (offscreen) { |
2215 if (attrib_parser.samples_ > 0 && attrib_parser.sample_buffers_ > 0 && | 2215 if (attrib_parser.samples_ > 0 && attrib_parser.sample_buffers_ > 0 && |
2216 features().chromium_framebuffer_multisample) { | 2216 features().chromium_framebuffer_multisample) { |
2217 // Per ext_framebuffer_multisample spec, need max bound on sample count. | 2217 // Per ext_framebuffer_multisample spec, need max bound on sample count. |
2218 // max_sample_count must be initialized to a sane value. If | 2218 // max_sample_count must be initialized to a sane value. If |
2219 // glGetIntegerv() throws a GL error, it leaves its argument unchanged. | 2219 // glGetIntegerv() throws a GL error, it leaves its argument unchanged. |
2220 GLint max_sample_count = 1; | 2220 GLint max_sample_count = 1; |
(...skipping 8031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10252 return error::kNoError; | 10252 return error::kNoError; |
10253 } | 10253 } |
10254 | 10254 |
10255 // Include the auto-generated part of this file. We split this because it means | 10255 // Include the auto-generated part of this file. We split this because it means |
10256 // we can easily edit the non-auto generated parts right here in this file | 10256 // we can easily edit the non-auto generated parts right here in this file |
10257 // instead of having to edit some template or the code generator. | 10257 // instead of having to edit some template or the code generator. |
10258 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10258 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10259 | 10259 |
10260 } // namespace gles2 | 10260 } // namespace gles2 |
10261 } // namespace gpu | 10261 } // namespace gpu |
OLD | NEW |