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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12079111: Allow separately blacklisting Stage3D baseline mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 #else 454 #else
455 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 455 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
456 #endif 456 #endif
457 457
458 prefs.flash_3d_enabled = 458 prefs.flash_3d_enabled =
459 GpuProcessHost::gpu_enabled() && 459 GpuProcessHost::gpu_enabled() &&
460 !command_line.HasSwitch(switches::kDisableFlash3d); 460 !command_line.HasSwitch(switches::kDisableFlash3d);
461 prefs.flash_stage3d_enabled = 461 prefs.flash_stage3d_enabled =
462 GpuProcessHost::gpu_enabled() && 462 GpuProcessHost::gpu_enabled() &&
463 !command_line.HasSwitch(switches::kDisableFlashStage3d); 463 !command_line.HasSwitch(switches::kDisableFlashStage3d);
464 prefs.flash_stage3d_baseline_enabled =
465 GpuProcessHost::gpu_enabled() &&
466 !command_line.HasSwitch(switches::kDisableFlashStage3d);
464 467
465 prefs.gl_multisampling_enabled = 468 prefs.gl_multisampling_enabled =
466 !command_line.HasSwitch(switches::kDisableGLMultisampling); 469 !command_line.HasSwitch(switches::kDisableGLMultisampling);
467 prefs.privileged_webgl_extensions_enabled = 470 prefs.privileged_webgl_extensions_enabled =
468 command_line.HasSwitch(switches::kEnablePrivilegedWebGLExtensions); 471 command_line.HasSwitch(switches::kEnablePrivilegedWebGLExtensions);
469 prefs.site_specific_quirks_enabled = 472 prefs.site_specific_quirks_enabled =
470 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 473 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
471 prefs.allow_file_access_from_file_urls = 474 prefs.allow_file_access_from_file_urls =
472 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 475 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
473 prefs.show_composited_layer_borders = 476 prefs.show_composited_layer_borders =
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 { // Certain GPU features might have been blacklisted. 578 { // Certain GPU features might have been blacklisted.
576 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 579 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
577 DCHECK(gpu_data_manager); 580 DCHECK(gpu_data_manager);
578 uint32 blacklist_type = gpu_data_manager->GetBlacklistedFeatures(); 581 uint32 blacklist_type = gpu_data_manager->GetBlacklistedFeatures();
579 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) 582 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)
580 prefs.accelerated_compositing_enabled = false; 583 prefs.accelerated_compositing_enabled = false;
581 if (blacklist_type & GPU_FEATURE_TYPE_WEBGL) 584 if (blacklist_type & GPU_FEATURE_TYPE_WEBGL)
582 prefs.experimental_webgl_enabled = false; 585 prefs.experimental_webgl_enabled = false;
583 if (blacklist_type & GPU_FEATURE_TYPE_FLASH3D) 586 if (blacklist_type & GPU_FEATURE_TYPE_FLASH3D)
584 prefs.flash_3d_enabled = false; 587 prefs.flash_3d_enabled = false;
585 if (blacklist_type & GPU_FEATURE_TYPE_FLASH_STAGE3D) 588 if (blacklist_type & GPU_FEATURE_TYPE_FLASH_STAGE3D) {
586 prefs.flash_stage3d_enabled = false; 589 prefs.flash_stage3d_enabled = false;
590 prefs.flash_stage3d_baseline_enabled = false;
591 }
592 if (blacklist_type & GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE)
593 prefs.flash_stage3d_baseline_enabled = false;
587 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) 594 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
588 prefs.accelerated_2d_canvas_enabled = false; 595 prefs.accelerated_2d_canvas_enabled = false;
589 if (blacklist_type & GPU_FEATURE_TYPE_MULTISAMPLING) 596 if (blacklist_type & GPU_FEATURE_TYPE_MULTISAMPLING)
590 prefs.gl_multisampling_enabled = false; 597 prefs.gl_multisampling_enabled = false;
591 if (blacklist_type & GPU_FEATURE_TYPE_3D_CSS) { 598 if (blacklist_type & GPU_FEATURE_TYPE_3D_CSS) {
592 prefs.accelerated_compositing_for_3d_transforms_enabled = false; 599 prefs.accelerated_compositing_for_3d_transforms_enabled = false;
593 prefs.accelerated_compositing_for_animation_enabled = false; 600 prefs.accelerated_compositing_for_animation_enabled = false;
594 } 601 }
595 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_VIDEO) 602 if (blacklist_type & GPU_FEATURE_TYPE_ACCELERATED_VIDEO)
596 prefs.accelerated_compositing_for_video_enabled = false; 603 prefs.accelerated_compositing_for_video_enabled = false;
(...skipping 2919 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 3523
3517 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { 3524 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const {
3518 return browser_plugin_guest_.get(); 3525 return browser_plugin_guest_.get();
3519 } 3526 }
3520 3527
3521 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { 3528 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const {
3522 return browser_plugin_embedder_.get(); 3529 return browser_plugin_embedder_.get();
3523 } 3530 }
3524 3531
3525 } // namespace content 3532 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/resources/gpu/info_view.js ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698