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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 10031047: Merge 131225 - Disable image transport surface on AMD's dynamic switchable graphics. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/browser/gpu_util.cc ('k') | content/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gpu/gpu_data_manager_impl.h" 5 #include "content/browser/gpu/gpu_data_manager_impl.h"
6 6
7 #if defined(OS_MACOSX) 7 #if defined(OS_MACOSX)
8 #include <CoreGraphics/CGDisplayConfiguration.h> 8 #include <CoreGraphics/CGDisplayConfiguration.h>
9 #endif 9 #endif
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 if (!swiftshader_path.empty()) 234 if (!swiftshader_path.empty())
235 command_line->AppendSwitchPath(switches::kSwiftShaderPath, 235 command_line->AppendSwitchPath(switches::kSwiftShaderPath,
236 swiftshader_path); 236 swiftshader_path);
237 237
238 { 238 {
239 base::AutoLock auto_lock(gpu_info_lock_); 239 base::AutoLock auto_lock(gpu_info_lock_);
240 if (gpu_info_.optimus) 240 if (gpu_info_.optimus)
241 command_line->AppendSwitch(switches::kReduceGpuSandbox); 241 command_line->AppendSwitch(switches::kReduceGpuSandbox);
242 if (gpu_info_.amd_switchable) {
243 // The image transport surface currently doesn't work with AMD Dynamic
244 // Switchable graphics.
245 command_line->AppendSwitch(switches::kReduceGpuSandbox);
246 command_line->AppendSwitch(switches::kDisableImageTransportSurface);
247 }
242 } 248 }
243 } 249 }
244 250
245 void GpuDataManagerImpl::SetGpuFeatureType(GpuFeatureType feature_type) { 251 void GpuDataManagerImpl::SetGpuFeatureType(GpuFeatureType feature_type) {
246 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
247 UpdateGpuFeatureType(feature_type); 253 UpdateGpuFeatureType(feature_type);
248 preliminary_gpu_feature_type_ = gpu_feature_type_; 254 preliminary_gpu_feature_type_ = gpu_feature_type_;
249 } 255 }
250 256
251 void GpuDataManagerImpl::HandleGpuSwitch() { 257 void GpuDataManagerImpl::HandleGpuSwitch() {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 object->vendor_id != other.vendor_id) { 339 object->vendor_id != other.vendor_id) {
334 *object = other; 340 *object = other;
335 return true; 341 return true;
336 } 342 }
337 343
338 bool changed = false; 344 bool changed = false;
339 if (!object->finalized) { 345 if (!object->finalized) {
340 object->finalized = other.finalized; 346 object->finalized = other.finalized;
341 object->initialization_time = other.initialization_time; 347 object->initialization_time = other.initialization_time;
342 object->optimus |= other.optimus; 348 object->optimus |= other.optimus;
349 object->amd_switchable |= other.amd_switchable;
343 350
344 if (object->driver_vendor.empty()) { 351 if (object->driver_vendor.empty()) {
345 changed |= object->driver_vendor != other.driver_vendor; 352 changed |= object->driver_vendor != other.driver_vendor;
346 object->driver_vendor = other.driver_vendor; 353 object->driver_vendor = other.driver_vendor;
347 } 354 }
348 if (object->driver_version.empty()) { 355 if (object->driver_version.empty()) {
349 changed |= object->driver_version != other.driver_version; 356 changed |= object->driver_version != other.driver_version;
350 object->driver_version = other.driver_version; 357 object->driver_version = other.driver_version;
351 } 358 }
352 if (object->driver_date.empty()) { 359 if (object->driver_date.empty()) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 #if defined(OS_WIN) 394 #if defined(OS_WIN)
388 if (object->dx_diagnostics.values.size() == 0 && 395 if (object->dx_diagnostics.values.size() == 0 &&
389 object->dx_diagnostics.children.size() == 0) { 396 object->dx_diagnostics.children.size() == 0) {
390 object->dx_diagnostics = other.dx_diagnostics; 397 object->dx_diagnostics = other.dx_diagnostics;
391 changed = true; 398 changed = true;
392 } 399 }
393 #endif 400 #endif
394 } 401 }
395 return changed; 402 return changed;
396 } 403 }
OLDNEW
« no previous file with comments | « chrome/browser/gpu_util.cc ('k') | content/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698