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

Unified Diff: cc/output/dc_layer_overlay.cc

Issue 2901723002: Record histogram of reason for quads not being put in an overlay. (Closed)
Patch Set: put in one function Created 3 years, 7 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 | « cc/output/dc_layer_overlay.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/dc_layer_overlay.cc
diff --git a/cc/output/dc_layer_overlay.cc b/cc/output/dc_layer_overlay.cc
index eda508e6e13243b6787f3c841565d0d0f0aa788c..7cf68722011ea0e867f074a2174929bcc9259672 100644
--- a/cc/output/dc_layer_overlay.cc
+++ b/cc/output/dc_layer_overlay.cc
@@ -4,6 +4,7 @@
#include "cc/output/dc_layer_overlay.h"
+#include "base/metrics/histogram_macros.h"
#include "cc/base/math_util.h"
#include "cc/quads/solid_color_draw_quad.h"
#include "cc/quads/yuv_video_draw_quad.h"
@@ -68,6 +69,11 @@ gfx::RectF GetOcclusionBounds(const gfx::RectF& target_quad,
return occlusion_bounding_box;
}
+void RecordDCLayerResult(DCLayerOverlayProcessor::DCLayerResult result) {
+ UMA_HISTOGRAM_ENUMERATION("GPU.DirectComposition.DCLayerResult", result,
+ DCLayerOverlayProcessor::DC_LAYER_FAILED_MAX);
+}
+
} // namespace
DCLayerOverlay::DCLayerOverlay() : filter(GL_LINEAR) {}
@@ -85,7 +91,7 @@ DCLayerOverlayProcessor::DCLayerResult DCLayerOverlayProcessor::FromDrawQuad(
if (quad->shared_quad_state->blend_mode != SkBlendMode::kSrcOver)
return DC_LAYER_FAILED_QUAD_BLEND_MODE;
- DCLayerResult result = DC_LAYER_FAILED_UNKNOWN;
+ DCLayerResult result;
switch (quad->material) {
case DrawQuad::YUV_VIDEO_CONTENT:
result =
@@ -93,7 +99,7 @@ DCLayerOverlayProcessor::DCLayerResult DCLayerOverlayProcessor::FromDrawQuad(
ca_layer_overlay);
break;
default:
- return DC_LAYER_FAILED_UNKNOWN;
+ return DC_LAYER_FAILED_UNSUPPORTED_QUAD;
}
if (result != DC_LAYER_SUCCESS)
return result;
@@ -128,13 +134,16 @@ void DCLayerOverlayProcessor::Process(ResourceProvider* resource_provider,
DCLayerOverlay ca_layer;
DCLayerResult result = FromDrawQuad(resource_provider, display_rect,
quad_list->begin(), it, &ca_layer);
- if (result != DC_LAYER_SUCCESS)
+ if (result != DC_LAYER_SUCCESS) {
+ RecordDCLayerResult(result);
continue;
+ }
if (!it->shared_quad_state->quad_to_target_transform
.Preserves2dAxisAlignment() &&
!base::FeatureList::IsEnabled(
features::kDirectCompositionComplexOverlays)) {
+ RecordDCLayerResult(DC_LAYER_FAILED_COMPLEX_TRANSFORM);
continue;
}
@@ -152,6 +161,7 @@ void DCLayerOverlayProcessor::Process(ResourceProvider* resource_provider,
quad_list->EraseAndInvalidateAllPointers(it);
} else if (!base::FeatureList::IsEnabled(
features::kDirectCompositionUnderlays)) {
+ RecordDCLayerResult(DC_LAYER_FAILED_OCCLUDED);
continue;
} else {
// The quad is occluded, so replace it with a black solid color quad and
« no previous file with comments | « cc/output/dc_layer_overlay.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698