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

Unified Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 11026015: Add calls to inform gpu of browser window count (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable on Android Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 07a59531f14b87934fade2c3cda0e0e229655735..923aecd18a95aaae9e1efce3d91753d77b2563b7 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -76,7 +76,8 @@ GpuDataManagerImpl::GpuDataManagerImpl()
observer_list_(new GpuDataManagerObserverList),
software_rendering_(false),
card_blacklisted_(false),
- update_histograms_(true) {
+ update_histograms_(true),
+ window_count_(0) {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) {
command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
@@ -285,6 +286,22 @@ void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) {
observer_list_->RemoveObserver(observer);
}
+void GpuDataManagerImpl::SetWindowCount(uint32 count) {
+ {
+ base::AutoLock auto_lock(gpu_info_lock_);
+ window_count_ = count;
+ }
+ GpuProcessHost::SendOnIO(
+ GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+ new GpuMsg_SetVideoMemoryWindowCount(count));
+}
+
+uint32 GpuDataManagerImpl::GetWindowCount() const {
+ base::AutoLock auto_lock(gpu_info_lock_);
+ return window_count_;
+}
+
void GpuDataManagerImpl::AppendRendererCommandLine(
CommandLine* command_line) const {
DCHECK(command_line);
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698