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

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

Issue 10854076: Add GPU memory tab to the task manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 4 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
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 a2a320cde5c4a5aaeaf16fb9060101858b03d65a..a1e3452821d4b7e41ea6bdbe65be90a7d87bf1d5 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -118,6 +118,13 @@ content::GPUInfo GpuDataManagerImpl::GetGPUInfo() const {
return gpu_info_;
}
+void GpuDataManagerImpl::RequestVideoMemoryUsageStatsUpdate() {
+ GpuProcessHost::SendOnIO(
+ GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ content::CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+ new GpuMsg_GetVideoMemoryUsageStats());
+}
+
void GpuDataManagerImpl::AddLogMessage(Value* msg) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
log_messages_.Append(msg);
@@ -295,6 +302,12 @@ void GpuDataManagerImpl::NotifyGpuInfoUpdate() {
observer_list_->Notify(&GpuDataManagerObserver::OnGpuInfoUpdate);
}
+void GpuDataManagerImpl::UpdateVideoMemoryUsageStats(
+ const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) {
+ observer_list_->Notify(&GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate,
+ video_memory_usage_stats);
+}
+
void GpuDataManagerImpl::UpdateGpuFeatureType(
GpuFeatureType embedder_feature_type) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

Powered by Google App Engine
This is Rietveld 408576698