| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |