| 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 "content/browser/gpu/gpu_process_host.h" |     5 #include "content/browser/gpu/gpu_process_host.h" | 
|     6  |     6  | 
|     7 #include <stddef.h> |     7 #include <stddef.h> | 
|     8  |     8  | 
|     9 #include <algorithm> |     9 #include <algorithm> | 
|    10 #include <list> |    10 #include <list> | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    64 #include "ipc/ipc_channel_handle.h" |    64 #include "ipc/ipc_channel_handle.h" | 
|    65 #include "ipc/message_filter.h" |    65 #include "ipc/message_filter.h" | 
|    66 #include "media/base/media_switches.h" |    66 #include "media/base/media_switches.h" | 
|    67 #include "media/media_features.h" |    67 #include "media/media_features.h" | 
|    68 #include "mojo/edk/embedder/embedder.h" |    68 #include "mojo/edk/embedder/embedder.h" | 
|    69 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" |    69 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" | 
|    70 #include "services/service_manager/public/cpp/connection.h" |    70 #include "services/service_manager/public/cpp/connection.h" | 
|    71 #include "services/service_manager/public/cpp/interface_provider.h" |    71 #include "services/service_manager/public/cpp/interface_provider.h" | 
|    72 #include "services/service_manager/public/cpp/interface_registry.h" |    72 #include "services/service_manager/public/cpp/interface_registry.h" | 
|    73 #include "services/service_manager/runner/common/client_util.h" |    73 #include "services/service_manager/runner/common/client_util.h" | 
|    74 #include "ui/base/ui_base_switches.h" |    74 #include "ui/display/display_switches.h" | 
|    75 #include "ui/events/latency_info.h" |    75 #include "ui/events/latency_info.h" | 
|    76 #include "ui/gfx/switches.h" |    76 #include "ui/gfx/switches.h" | 
|    77 #include "ui/gl/gl_switches.h" |    77 #include "ui/gl/gl_switches.h" | 
|    78  |    78  | 
|    79 #if defined(OS_ANDROID) |    79 #if defined(OS_ANDROID) | 
|    80 #include "base/android/build_info.h" |    80 #include "base/android/build_info.h" | 
|    81 #endif |    81 #endif | 
|    82  |    82  | 
|    83 #if defined(OS_WIN) |    83 #if defined(OS_WIN) | 
|    84 #include "base/win/windows_version.h" |    84 #include "base/win/windows_version.h" | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|    95 #endif |    95 #endif | 
|    96  |    96  | 
|    97 #if defined(USE_X11) && !defined(OS_CHROMEOS) |    97 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 
|    98 #include "ui/gfx/x/x11_switches.h"  // nogncheck |    98 #include "ui/gfx/x/x11_switches.h"  // nogncheck | 
|    99 #endif |    99 #endif | 
|   100  |   100  | 
|   101 #if defined(OS_MACOSX) || defined(OS_ANDROID) |   101 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 
|   102 #include "gpu/ipc/common/gpu_surface_tracker.h" |   102 #include "gpu/ipc/common/gpu_surface_tracker.h" | 
|   103 #endif |   103 #endif | 
|   104  |   104  | 
 |   105 #if defined(OS_MACOSX) | 
 |   106 #include "ui/base/ui_base_switches.h" | 
 |   107 #endif | 
 |   108  | 
|   105 namespace content { |   109 namespace content { | 
|   106  |   110  | 
|   107 bool GpuProcessHost::gpu_enabled_ = true; |   111 bool GpuProcessHost::gpu_enabled_ = true; | 
|   108 bool GpuProcessHost::hardware_gpu_enabled_ = true; |   112 bool GpuProcessHost::hardware_gpu_enabled_ = true; | 
|   109 int GpuProcessHost::gpu_crash_count_ = 0; |   113 int GpuProcessHost::gpu_crash_count_ = 0; | 
|   110 int GpuProcessHost::gpu_recent_crash_count_ = 0; |   114 int GpuProcessHost::gpu_recent_crash_count_ = 0; | 
|   111 bool GpuProcessHost::crashed_before_ = false; |   115 bool GpuProcessHost::crashed_before_ = false; | 
|   112 int GpuProcessHost::swiftshader_crash_count_ = 0; |   116 int GpuProcessHost::swiftshader_crash_count_ = 0; | 
|   113  |   117  | 
|   114 namespace { |   118 namespace { | 
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1244       GetShaderCacheFactorySingleton()->Get(client_id); |  1248       GetShaderCacheFactorySingleton()->Get(client_id); | 
|  1245   if (!cache.get()) |  1249   if (!cache.get()) | 
|  1246     return; |  1250     return; | 
|  1247  |  1251  | 
|  1248   cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); |  1252   cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); | 
|  1249  |  1253  | 
|  1250   client_id_to_shader_cache_[client_id] = cache; |  1254   client_id_to_shader_cache_[client_id] = cache; | 
|  1251 } |  1255 } | 
|  1252  |  1256  | 
|  1253 }  // namespace content |  1257 }  // namespace content | 
| OLD | NEW |