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

Unified Diff: cc/surfaces/surface_aggregator.h

Issue 2752053003: Add UMA stats for SurfaceDrawQuads in SurfaceAggregator. (Closed)
Patch Set: Change to each. Created 3 years, 9 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 | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.h
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index 3b5e80b581e731d4b5b3d05799b2d5c93b7ebe35..ec69f5d3319f7702056a1f18dc3a3d24580eab83 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -76,6 +76,21 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
bool in_use = true;
};
+ struct SurfaceDrawQuadUmaStats {
+ void Reset() {
+ valid_surface = 0;
+ missing_surface = 0;
+ no_active_frame = 0;
+ }
+
+ // The surface exists and has an active frame.
+ int valid_surface;
+ // The surface doesn't exist.
+ int missing_surface;
+ // The surface exists but doesn't have an active frame.
+ int no_active_frame;
+ };
+
ClipData CalculateClipRect(const ClipData& surface_clip,
const ClipData& quad_clip,
const gfx::Transform& target_transform);
@@ -193,6 +208,9 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
// Resource list for the aggregated frame.
TransferableResourceArray* dest_resource_list_;
+ // Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate().
+ SurfaceDrawQuadUmaStats uma_stats_;
+
base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
« no previous file with comments | « no previous file | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698