| 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 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3176 group_->gpu_preferences().compile_shader_always_succeeds; | 3176 group_->gpu_preferences().compile_shader_always_succeeds; |
| 3177 | 3177 |
| 3178 // Take ownership of the context and surface. The surface can be replaced with | 3178 // Take ownership of the context and surface. The surface can be replaced with |
| 3179 // SetSurface. | 3179 // SetSurface. |
| 3180 context_ = context; | 3180 context_ = context; |
| 3181 surface_ = surface; | 3181 surface_ = surface; |
| 3182 | 3182 |
| 3183 // Create GPU Tracer for timing values. | 3183 // Create GPU Tracer for timing values. |
| 3184 gpu_tracer_.reset(new GPUTracer(this)); | 3184 gpu_tracer_.reset(new GPUTracer(this)); |
| 3185 | 3185 |
| 3186 // Pass some workarounds to GLContext so that we can apply them in RealGLApi. |
| 3187 gl::GLWorkarounds gl_workarounds; |
| 3188 if (workarounds().clear_to_zero_or_one_broken) { |
| 3189 gl_workarounds.clear_to_zero_or_one_broken = true; |
| 3190 } |
| 3191 GetGLContext()->SetGLWorkarounds(gl_workarounds); |
| 3192 |
| 3186 if (workarounds().disable_timestamp_queries) { | 3193 if (workarounds().disable_timestamp_queries) { |
| 3187 // Forcing time elapsed query for any GPU Timing Client forces it for all | 3194 // Forcing time elapsed query for any GPU Timing Client forces it for all |
| 3188 // clients in the context. | 3195 // clients in the context. |
| 3189 GetGLContext()->CreateGPUTimingClient()->ForceTimeElapsedQuery(); | 3196 GetGLContext()->CreateGPUTimingClient()->ForceTimeElapsedQuery(); |
| 3190 } | 3197 } |
| 3191 | 3198 |
| 3192 // Save the loseContextWhenOutOfMemory context creation attribute. | 3199 // Save the loseContextWhenOutOfMemory context creation attribute. |
| 3193 lose_context_when_out_of_memory_ = | 3200 lose_context_when_out_of_memory_ = |
| 3194 attrib_helper.lose_context_when_out_of_memory; | 3201 attrib_helper.lose_context_when_out_of_memory; |
| 3195 | 3202 |
| (...skipping 16564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19760 } | 19767 } |
| 19761 | 19768 |
| 19762 // Include the auto-generated part of this file. We split this because it means | 19769 // Include the auto-generated part of this file. We split this because it means |
| 19763 // we can easily edit the non-auto generated parts right here in this file | 19770 // we can easily edit the non-auto generated parts right here in this file |
| 19764 // instead of having to edit some template or the code generator. | 19771 // instead of having to edit some template or the code generator. |
| 19765 #include "base/macros.h" | 19772 #include "base/macros.h" |
| 19766 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19773 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 19767 | 19774 |
| 19768 } // namespace gles2 | 19775 } // namespace gles2 |
| 19769 } // namespace gpu | 19776 } // namespace gpu |
| OLD | NEW |