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

Unified Diff: services/ui/gpu/gpu_service.cc

Issue 2717233003: gpu: Use mojom API for getting video memory usage. (Closed)
Patch Set: . Created 3 years, 10 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 | « services/ui/gpu/gpu_service.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_service.cc
diff --git a/services/ui/gpu/gpu_service.cc b/services/ui/gpu/gpu_service.cc
index 2f10a0711f58defb2c27456f18f95e8fcdf4acf8..c0e224eae456aa9f08042ec1ce96d7f701213a35 100644
--- a/services/ui/gpu/gpu_service.cc
+++ b/services/ui/gpu/gpu_service.cc
@@ -127,6 +127,16 @@ void GpuService::DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token);
}
+void GpuService::GetVideoMemoryUsageStats(
+ const GetVideoMemoryUsageStatsCallback& callback) {
+ gpu::VideoMemoryUsageStats video_memory_usage_stats;
+ if (gpu_channel_manager_) {
+ gpu_channel_manager_->gpu_memory_manager()->GetVideoMemoryUsageStats(
+ &video_memory_usage_stats);
+ }
+ callback.Run(video_memory_usage_stats);
+}
+
void GpuService::DidCreateOffscreenContext(const GURL& active_url) {
gpu_host_->DidCreateOffscreenContext(active_url);
}
« no previous file with comments | « services/ui/gpu/gpu_service.h ('k') | services/ui/gpu/interfaces/gpu_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698