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

Side by Side Diff: cc/output/dc_layer_overlay.cc

Issue 2908623006: Record histogram when succeeding in creating a DC layer overlay. (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/dc_layer_overlay.h" 5 #include "cc/output/dc_layer_overlay.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/quads/solid_color_draw_quad.h" 9 #include "cc/quads/solid_color_draw_quad.h"
10 #include "cc/quads/yuv_video_draw_quad.h" 10 #include "cc/quads/yuv_video_draw_quad.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 } else { 199 } else {
200 // Entire replacement quad must be redrawn. 200 // Entire replacement quad must be redrawn.
201 damage_rect->Union(quad_rectangle); 201 damage_rect->Union(quad_rectangle);
202 } 202 }
203 previous_occlusion_bounding_box_ = 203 previous_occlusion_bounding_box_ =
204 gfx::ToEnclosingRect(occlusion_bounding_box); 204 gfx::ToEnclosingRect(occlusion_bounding_box);
205 } 205 }
206 overlay_damage_rect->Union(quad_rectangle); 206 overlay_damage_rect->Union(quad_rectangle);
207 207
208 RecordDCLayerResult(DC_LAYER_SUCCESS);
208 ca_layer_overlays->push_back(ca_layer); 209 ca_layer_overlays->push_back(ca_layer);
209 // Only allow one overlay for now. 210 // Only allow one overlay for now.
210 break; 211 break;
211 } 212 }
212 damage_rect->Intersect(gfx::ToEnclosingRect(display_rect)); 213 damage_rect->Intersect(gfx::ToEnclosingRect(display_rect));
213 previous_frame_underlay_rect_ = this_frame_underlay_rect; 214 previous_frame_underlay_rect_ = this_frame_underlay_rect;
214 previous_display_rect_ = display_rect; 215 previous_display_rect_ = display_rect;
215 } 216 }
216 217
217 } // namespace cc 218 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698