Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2744363002: Clear shader disk cache after glProgramBinary failure. (Closed)
Patch Set: Fix dependency issues. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/gpu/gpu_child_thread.h" 5 #include "content/gpu/gpu_child_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/threading/thread_local.h" 14 #include "base/threading/thread_local.h"
15 #include "base/threading/thread_task_runner_handle.h" 15 #include "base/threading/thread_task_runner_handle.h"
16 #include "base/threading/worker_pool.h" 16 #include "base/threading/worker_pool.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/child/child_process.h" 18 #include "content/child/child_process.h"
19 #include "content/child/thread_safe_sender.h" 19 #include "content/child/thread_safe_sender.h"
20 #include "content/common/establish_channel_params.h" 20 #include "content/common/establish_channel_params.h"
21 #include "content/common/gpu_host_messages.h" 21 #include "content/common/gpu_host_messages.h"
22 #include "content/gpu/gpu_service_factory.h" 22 #include "content/gpu/gpu_service_factory.h"
23 #include "content/public/common/content_client.h" 23 #include "content/public/common/content_client.h"
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "content/public/common/service_manager_connection.h" 25 #include "content/public/common/service_manager_connection.h"
26 #include "content/public/gpu/content_gpu_client.h" 26 #include "content/public/gpu/content_gpu_client.h"
27 #include "gpu/command_buffer/common/activity_flags.h"
27 #include "gpu/command_buffer/service/gpu_switches.h" 28 #include "gpu/command_buffer/service/gpu_switches.h"
28 #include "gpu/command_buffer/service/sync_point_manager.h" 29 #include "gpu/command_buffer/service/sync_point_manager.h"
29 #include "gpu/config/gpu_info_collector.h" 30 #include "gpu/config/gpu_info_collector.h"
30 #include "gpu/config/gpu_switches.h" 31 #include "gpu/config/gpu_switches.h"
31 #include "gpu/config/gpu_util.h" 32 #include "gpu/config/gpu_util.h"
32 #include "gpu/ipc/common/memory_stats.h" 33 #include "gpu/ipc/common/memory_stats.h"
33 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" 34 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
34 #include "gpu/ipc/service/gpu_watchdog_thread.h" 35 #include "gpu/ipc/service/gpu_watchdog_thread.h"
35 #include "ipc/ipc_channel_handle.h" 36 #include "ipc/ipc_channel_handle.h"
36 #include "ipc/ipc_sync_message_filter.h" 37 #include "ipc/ipc_sync_message_filter.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 mojo::ScopedInterfaceEndpointHandle handle) { 275 mojo::ScopedInterfaceEndpointHandle handle) {
275 if (associated_interfaces_.CanBindRequest(name)) 276 if (associated_interfaces_.CanBindRequest(name))
276 associated_interfaces_.BindRequest(name, std::move(handle)); 277 associated_interfaces_.BindRequest(name, std::move(handle));
277 else 278 else
278 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); 279 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle));
279 } 280 }
280 281
281 void GpuChildThread::CreateGpuService( 282 void GpuChildThread::CreateGpuService(
282 ui::mojom::GpuServiceRequest request, 283 ui::mojom::GpuServiceRequest request,
283 ui::mojom::GpuHostPtr gpu_host, 284 ui::mojom::GpuHostPtr gpu_host,
284 const gpu::GpuPreferences& gpu_preferences) { 285 const gpu::GpuPreferences& gpu_preferences,
286 mojo::ScopedSharedBufferHandle activity_flags) {
287 gpu::GpuProcessActivityFlags::InitializeInstance(std::move(activity_flags));
285 gpu_service_->Bind(std::move(request)); 288 gpu_service_->Bind(std::move(request));
286 289
287 gpu_info_.video_decode_accelerator_capabilities = 290 gpu_info_.video_decode_accelerator_capabilities =
288 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences); 291 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences);
289 gpu_info_.video_encode_accelerator_supported_profiles = 292 gpu_info_.video_encode_accelerator_supported_profiles =
290 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences); 293 media::GpuVideoEncodeAccelerator::GetSupportedProfiles(gpu_preferences);
291 gpu_info_.jpeg_decode_accelerator_supported = 294 gpu_info_.jpeg_decode_accelerator_supported =
292 media::GpuJpegDecodeAcceleratorFactoryProvider:: 295 media::GpuJpegDecodeAcceleratorFactoryProvider::
293 IsAcceleratedJpegDecodeSupported(); 296 IsAcceleratedJpegDecodeSupported();
294 297
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 420
418 void GpuChildThread::BindServiceFactoryRequest( 421 void GpuChildThread::BindServiceFactoryRequest(
419 service_manager::mojom::ServiceFactoryRequest request) { 422 service_manager::mojom::ServiceFactoryRequest request) {
420 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; 423 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest";
421 DCHECK(service_factory_); 424 DCHECK(service_factory_);
422 service_factory_bindings_.AddBinding(service_factory_.get(), 425 service_factory_bindings_.AddBinding(service_factory_.get(),
423 std::move(request)); 426 std::move(request));
424 } 427 }
425 428
426 } // namespace content 429 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698