| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79 #include "ui/gfx/transform.h" | 79 #include "ui/gfx/transform.h" | 
| 80 #include "ui/gl/ca_renderer_layer_params.h" | 80 #include "ui/gl/ca_renderer_layer_params.h" | 
| 81 #include "ui/gl/dc_renderer_layer_params.h" | 81 #include "ui/gl/dc_renderer_layer_params.h" | 
| 82 #include "ui/gl/gl_bindings.h" | 82 #include "ui/gl/gl_bindings.h" | 
| 83 #include "ui/gl/gl_context.h" | 83 #include "ui/gl/gl_context.h" | 
| 84 #include "ui/gl/gl_fence.h" | 84 #include "ui/gl/gl_fence.h" | 
| 85 #include "ui/gl/gl_image.h" | 85 #include "ui/gl/gl_image.h" | 
| 86 #include "ui/gl/gl_implementation.h" | 86 #include "ui/gl/gl_implementation.h" | 
| 87 #include "ui/gl/gl_surface.h" | 87 #include "ui/gl/gl_surface.h" | 
| 88 #include "ui/gl/gl_version_info.h" | 88 #include "ui/gl/gl_version_info.h" | 
|  | 89 #include "ui/gl/gl_workarounds.h" | 
| 89 #include "ui/gl/gpu_timing.h" | 90 #include "ui/gl/gpu_timing.h" | 
| 90 | 91 | 
| 91 #if defined(OS_MACOSX) | 92 #if defined(OS_MACOSX) | 
| 92 #include <IOSurface/IOSurface.h> | 93 #include <IOSurface/IOSurface.h> | 
| 93 // Note that this must be included after gl_bindings.h to avoid conflicts. | 94 // Note that this must be included after gl_bindings.h to avoid conflicts. | 
| 94 #include <OpenGL/CGLIOSurface.h> | 95 #include <OpenGL/CGLIOSurface.h> | 
| 95 #endif | 96 #endif | 
| 96 | 97 | 
| 97 namespace gpu { | 98 namespace gpu { | 
| 98 namespace gles2 { | 99 namespace gles2 { | 
| (...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3179   context_ = context; | 3180   context_ = context; | 
| 3180   surface_ = surface; | 3181   surface_ = surface; | 
| 3181 | 3182 | 
| 3182   // Set workarounds for the surface. | 3183   // Set workarounds for the surface. | 
| 3183   if (workarounds().rely_on_implicit_sync_for_swap_buffers) | 3184   if (workarounds().rely_on_implicit_sync_for_swap_buffers) | 
| 3184     surface_->SetRelyOnImplicitSync(); | 3185     surface_->SetRelyOnImplicitSync(); | 
| 3185 | 3186 | 
| 3186   // Create GPU Tracer for timing values. | 3187   // Create GPU Tracer for timing values. | 
| 3187   gpu_tracer_.reset(new GPUTracer(this)); | 3188   gpu_tracer_.reset(new GPUTracer(this)); | 
| 3188 | 3189 | 
|  | 3190   // Pass some workarounds to GLContext so that we can apply them in RealGLApi. | 
|  | 3191   gl::GLWorkarounds gl_workarounds; | 
|  | 3192   if (workarounds().clear_to_zero_or_one_broken) { | 
|  | 3193     gl_workarounds.clear_to_zero_or_one_broken = true; | 
|  | 3194   } | 
|  | 3195   GetGLContext()->SetGLWorkarounds(gl_workarounds); | 
|  | 3196 | 
| 3189   if (workarounds().disable_timestamp_queries) { | 3197   if (workarounds().disable_timestamp_queries) { | 
| 3190     // Forcing time elapsed query for any GPU Timing Client forces it for all | 3198     // Forcing time elapsed query for any GPU Timing Client forces it for all | 
| 3191     // clients in the context. | 3199     // clients in the context. | 
| 3192     GetGLContext()->CreateGPUTimingClient()->ForceTimeElapsedQuery(); | 3200     GetGLContext()->CreateGPUTimingClient()->ForceTimeElapsedQuery(); | 
| 3193   } | 3201   } | 
| 3194 | 3202 | 
| 3195   // Save the loseContextWhenOutOfMemory context creation attribute. | 3203   // Save the loseContextWhenOutOfMemory context creation attribute. | 
| 3196   lose_context_when_out_of_memory_ = | 3204   lose_context_when_out_of_memory_ = | 
| 3197       attrib_helper.lose_context_when_out_of_memory; | 3205       attrib_helper.lose_context_when_out_of_memory; | 
| 3198 | 3206 | 
| (...skipping 16567 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 19766 } | 19774 } | 
| 19767 | 19775 | 
| 19768 // Include the auto-generated part of this file. We split this because it means | 19776 // Include the auto-generated part of this file. We split this because it means | 
| 19769 // we can easily edit the non-auto generated parts right here in this file | 19777 // we can easily edit the non-auto generated parts right here in this file | 
| 19770 // instead of having to edit some template or the code generator. | 19778 // instead of having to edit some template or the code generator. | 
| 19771 #include "base/macros.h" | 19779 #include "base/macros.h" | 
| 19772 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 19780 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 
| 19773 | 19781 | 
| 19774 }  // namespace gles2 | 19782 }  // namespace gles2 | 
| 19775 }  // namespace gpu | 19783 }  // namespace gpu | 
| OLD | NEW | 
|---|