| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 const base::CommandLine* command_line = | 871 const base::CommandLine* command_line = |
| 872 base::CommandLine::ForCurrentProcess(); | 872 base::CommandLine::ForCurrentProcess(); |
| 873 if (!ShouldDisableAcceleratedVideoDecode(command_line) && | 873 if (!ShouldDisableAcceleratedVideoDecode(command_line) && |
| 874 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { | 874 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
| 875 prefs->pepper_accelerated_video_decode_enabled = true; | 875 prefs->pepper_accelerated_video_decode_enabled = true; |
| 876 } | 876 } |
| 877 prefs->disable_2d_canvas_copy_on_write = | 877 prefs->disable_2d_canvas_copy_on_write = |
| 878 IsDriverBugWorkaroundActive(gpu::BROKEN_EGL_IMAGE_REF_COUNTING) && | 878 IsDriverBugWorkaroundActive(gpu::BROKEN_EGL_IMAGE_REF_COUNTING) && |
| 879 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); | 879 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); |
| 880 prefs->force_software_readback_from_2d_canvas = | |
| 881 IsDriverBugWorkaroundActive(gpu::FORCE_SOFTWARE_READBACK_FROM_2D_CANVAS); | |
| 882 } | 880 } |
| 883 | 881 |
| 884 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { | 882 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { |
| 885 if (!is_initialized_) { | 883 if (!is_initialized_) { |
| 886 post_init_tasks_.push_back( | 884 post_init_tasks_.push_back( |
| 887 base::Bind(&GpuDataManagerImplPrivate::DisableHardwareAcceleration, | 885 base::Bind(&GpuDataManagerImplPrivate::DisableHardwareAcceleration, |
| 888 base::Unretained(this))); | 886 base::Unretained(this))); |
| 889 return; | 887 return; |
| 890 } | 888 } |
| 891 | 889 |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1321 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1324 #if defined(OS_WIN) | 1322 #if defined(OS_WIN) |
| 1325 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1323 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1326 #endif | 1324 #endif |
| 1327 complete_gpu_info_already_requested_ = true; | 1325 complete_gpu_info_already_requested_ = true; |
| 1328 // Some observers might be waiting. | 1326 // Some observers might be waiting. |
| 1329 NotifyGpuInfoUpdate(); | 1327 NotifyGpuInfoUpdate(); |
| 1330 } | 1328 } |
| 1331 | 1329 |
| 1332 } // namespace content | 1330 } // namespace content |
| OLD | NEW |