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

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

Issue 10891013: Make GpuDataManager thread safe. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 prefs.enable_scroll_animator = true; 547 prefs.enable_scroll_animator = true;
548 if (command_line.HasSwitch(switches::kDisableSmoothScrolling)) 548 if (command_line.HasSwitch(switches::kDisableSmoothScrolling))
549 prefs.enable_scroll_animator = false; 549 prefs.enable_scroll_animator = false;
550 550
551 prefs.visual_word_movement_enabled = 551 prefs.visual_word_movement_enabled =
552 command_line.HasSwitch(switches::kEnableVisualWordMovement); 552 command_line.HasSwitch(switches::kEnableVisualWordMovement);
553 553
554 { // Certain GPU features might have been blacklisted. 554 { // Certain GPU features might have been blacklisted.
555 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 555 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
556 DCHECK(gpu_data_manager); 556 DCHECK(gpu_data_manager);
557 uint32 blacklist_type = gpu_data_manager->GetGpuFeatureType(); 557 uint32 blacklist_type = gpu_data_manager->GetBlacklistedFeatures();
558 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) 558 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)
559 prefs.accelerated_compositing_enabled = false; 559 prefs.accelerated_compositing_enabled = false;
560 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL) 560 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL)
561 prefs.experimental_webgl_enabled = false; 561 prefs.experimental_webgl_enabled = false;
562 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH3D) 562 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH3D)
563 prefs.flash_3d_enabled = false; 563 prefs.flash_3d_enabled = false;
564 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH_STAGE3D) 564 if (blacklist_type & content::GPU_FEATURE_TYPE_FLASH_STAGE3D)
565 prefs.flash_stage3d_enabled = false; 565 prefs.flash_stage3d_enabled = false;
566 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) 566 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
567 prefs.accelerated_2d_canvas_enabled = false; 567 prefs.accelerated_2d_canvas_enabled = false;
(...skipping 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 old_browser_plugin_host()->embedder_render_process_host(); 3253 old_browser_plugin_host()->embedder_render_process_host();
3254 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3254 *embedder_container_id = old_browser_plugin_host()->instance_id();
3255 int embedder_process_id = 3255 int embedder_process_id =
3256 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3256 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3257 if (embedder_process_id != -1) { 3257 if (embedder_process_id != -1) {
3258 *embedder_channel_name = 3258 *embedder_channel_name =
3259 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3259 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3260 embedder_process_id); 3260 embedder_process_id);
3261 } 3261 }
3262 } 3262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698