OLD | NEW |
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 #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/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 | 279 |
280 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) { | 280 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) { |
281 observer_list_->AddObserver(observer); | 281 observer_list_->AddObserver(observer); |
282 } | 282 } |
283 | 283 |
284 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) { | 284 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) { |
285 observer_list_->RemoveObserver(observer); | 285 observer_list_->RemoveObserver(observer); |
286 } | 286 } |
287 | 287 |
| 288 void GpuDataManagerImpl::SetWindowCount(uint32 count) { |
| 289 GpuProcessHost::SendOnIO( |
| 290 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, |
| 291 content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH, |
| 292 new GpuMsg_SetVideoMemoryWindowCount(count)); |
| 293 } |
| 294 |
288 void GpuDataManagerImpl::AppendRendererCommandLine( | 295 void GpuDataManagerImpl::AppendRendererCommandLine( |
289 CommandLine* command_line) const { | 296 CommandLine* command_line) const { |
290 DCHECK(command_line); | 297 DCHECK(command_line); |
291 | 298 |
292 uint32 flags = GetBlacklistedFeatures(); | 299 uint32 flags = GetBlacklistedFeatures(); |
293 if ((flags & content::GPU_FEATURE_TYPE_WEBGL)) { | 300 if ((flags & content::GPU_FEATURE_TYPE_WEBGL)) { |
294 #if !defined(OS_ANDROID) | 301 #if !defined(OS_ANDROID) |
295 if (!command_line->HasSwitch(switches::kDisableExperimentalWebGL)) | 302 if (!command_line->HasSwitch(switches::kDisableExperimentalWebGL)) |
296 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); | 303 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); |
297 #endif | 304 #endif |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 } | 517 } |
511 | 518 |
512 void GpuDataManagerImpl::BlacklistCard() { | 519 void GpuDataManagerImpl::BlacklistCard() { |
513 card_blacklisted_ = true; | 520 card_blacklisted_ = true; |
514 | 521 |
515 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; | 522 gpu_feature_type_ = content::GPU_FEATURE_TYPE_ALL; |
516 | 523 |
517 EnableSoftwareRenderingIfNecessary(); | 524 EnableSoftwareRenderingIfNecessary(); |
518 NotifyGpuInfoUpdate(); | 525 NotifyGpuInfoUpdate(); |
519 } | 526 } |
OLD | NEW |