| 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 | 871 |
| 872 const base::CommandLine* command_line = | 872 const base::CommandLine* command_line = |
| 873 base::CommandLine::ForCurrentProcess(); | 873 base::CommandLine::ForCurrentProcess(); |
| 874 if (!ShouldDisableAcceleratedVideoDecode(command_line) && | 874 if (!ShouldDisableAcceleratedVideoDecode(command_line) && |
| 875 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { | 875 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) { |
| 876 prefs->pepper_accelerated_video_decode_enabled = true; | 876 prefs->pepper_accelerated_video_decode_enabled = true; |
| 877 } | 877 } |
| 878 prefs->disable_2d_canvas_copy_on_write = | 878 prefs->disable_2d_canvas_copy_on_write = |
| 879 IsDriverBugWorkaroundActive(gpu::BROKEN_EGL_IMAGE_REF_COUNTING) && | 879 IsDriverBugWorkaroundActive(gpu::BROKEN_EGL_IMAGE_REF_COUNTING) && |
| 880 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); | 880 command_line->HasSwitch(switches::kEnableThreadedTextureMailboxes); |
| 881 prefs->force_redundant_2d_canvas_copy = |
| 882 IsDriverBugWorkaroundActive(gpu::FORCE_REDUNDANT_2D_CANVAS_COPY); |
| 881 } | 883 } |
| 882 | 884 |
| 883 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { | 885 void GpuDataManagerImplPrivate::DisableHardwareAcceleration() { |
| 884 if (!is_initialized_) { | 886 if (!is_initialized_) { |
| 885 post_init_tasks_.push_back( | 887 post_init_tasks_.push_back( |
| 886 base::Bind(&GpuDataManagerImplPrivate::DisableHardwareAcceleration, | 888 base::Bind(&GpuDataManagerImplPrivate::DisableHardwareAcceleration, |
| 887 base::Unretained(this))); | 889 base::Unretained(this))); |
| 888 return; | 890 return; |
| 889 } | 891 } |
| 890 | 892 |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1324 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1323 #if defined(OS_WIN) | 1325 #if defined(OS_WIN) |
| 1324 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1326 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1325 #endif | 1327 #endif |
| 1326 complete_gpu_info_already_requested_ = true; | 1328 complete_gpu_info_already_requested_ = true; |
| 1327 // Some observers might be waiting. | 1329 // Some observers might be waiting. |
| 1328 NotifyGpuInfoUpdate(); | 1330 NotifyGpuInfoUpdate(); |
| 1329 } | 1331 } |
| 1330 | 1332 |
| 1331 } // namespace content | 1333 } // namespace content |
| OLD | NEW |