OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 #elif defined(OS_WIN) | 2043 #elif defined(OS_WIN) |
2044 if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) | 2044 if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) |
2045 needs_glsl_built_in_function_emulation_ = true; | 2045 needs_glsl_built_in_function_emulation_ = true; |
2046 #endif | 2046 #endif |
2047 } | 2047 } |
2048 | 2048 |
2049 if (!InitializeShaderTranslator()) { | 2049 if (!InitializeShaderTranslator()) { |
2050 return false; | 2050 return false; |
2051 } | 2051 } |
2052 | 2052 |
| 2053 // TRACE_EVENT for gpu tests: |
| 2054 TRACE_EVENT_INSTANT1("test_gpu", "GLES2DecoderImpl::Initialize", "GLImpl", |
| 2055 static_cast<int>(gfx::GetGLImplementation())); |
| 2056 |
2053 return true; | 2057 return true; |
2054 } | 2058 } |
2055 | 2059 |
2056 void GLES2DecoderImpl::UpdateCapabilities() { | 2060 void GLES2DecoderImpl::UpdateCapabilities() { |
2057 util_.set_num_compressed_texture_formats( | 2061 util_.set_num_compressed_texture_formats( |
2058 validators_->compressed_texture_format.GetValues().size()); | 2062 validators_->compressed_texture_format.GetValues().size()); |
2059 util_.set_num_shader_binary_formats( | 2063 util_.set_num_shader_binary_formats( |
2060 validators_->shader_binary_format.GetValues().size()); | 2064 validators_->shader_binary_format.GetValues().size()); |
2061 } | 2065 } |
2062 | 2066 |
(...skipping 5337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7400 return error::kNoError; | 7404 return error::kNoError; |
7401 } | 7405 } |
7402 | 7406 |
7403 // Include the auto-generated part of this file. We split this because it means | 7407 // Include the auto-generated part of this file. We split this because it means |
7404 // we can easily edit the non-auto generated parts right here in this file | 7408 // we can easily edit the non-auto generated parts right here in this file |
7405 // instead of having to edit some template or the code generator. | 7409 // instead of having to edit some template or the code generator. |
7406 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 7410 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
7407 | 7411 |
7408 } // namespace gles2 | 7412 } // namespace gles2 |
7409 } // namespace gpu | 7413 } // namespace gpu |
OLD | NEW |