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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 command_line->AppendSwitch(switches::kDisableGLMultisampling); | 632 command_line->AppendSwitch(switches::kDisableGLMultisampling); |
633 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && | 633 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) && |
634 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) | 634 !command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) |
635 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); | 635 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); |
636 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && | 636 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) && |
637 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) | 637 !command_line->HasSwitch(switches::kDisableAccelerated2dCanvas)) |
638 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 638 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
639 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && | 639 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE) && |
640 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) | 640 !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) |
641 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); | 641 command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode); |
642 if (ShouldUseSwiftShader()) | |
643 command_line->AppendSwitch(switches::kDisableFlashFullscreen3d); | |
644 } | 642 } |
645 | 643 |
646 void GpuDataManagerImplPrivate::AppendGpuCommandLine( | 644 void GpuDataManagerImplPrivate::AppendGpuCommandLine( |
647 CommandLine* command_line) const { | 645 CommandLine* command_line) const { |
648 DCHECK(command_line); | 646 DCHECK(command_line); |
649 | 647 |
650 std::string use_gl = | 648 std::string use_gl = |
651 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); | 649 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); |
652 base::FilePath swiftshader_path = | 650 base::FilePath swiftshader_path = |
653 CommandLine::ForCurrentProcess()->GetSwitchValuePath( | 651 CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 int render_process_id, | 1173 int render_process_id, |
1176 int render_view_id, | 1174 int render_view_id, |
1177 ThreeDAPIType requester) { | 1175 ThreeDAPIType requester) { |
1178 GpuDataManagerImpl::UnlockedSession session(owner_); | 1176 GpuDataManagerImpl::UnlockedSession session(owner_); |
1179 observer_list_->Notify(&GpuDataManagerObserver::DidBlock3DAPIs, | 1177 observer_list_->Notify(&GpuDataManagerObserver::DidBlock3DAPIs, |
1180 url, render_process_id, render_view_id, requester); | 1178 url, render_process_id, render_view_id, requester); |
1181 } | 1179 } |
1182 | 1180 |
1183 } // namespace content | 1181 } // namespace content |
1184 | 1182 |
OLD | NEW |