| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 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/overlay_processor.h" |    5 #include "cc/output/overlay_processor.h" | 
|    6  |    6  | 
|    7 #include "cc/output/output_surface.h" |    7 #include "cc/output/output_surface.h" | 
|    8 #include "cc/output/overlay_strategy_single_on_top.h" |    8 #include "cc/output/overlay_strategy_single_on_top.h" | 
|    9 #include "cc/output/overlay_strategy_underlay.h" |    9 #include "cc/output/overlay_strategy_underlay.h" | 
|   10 #include "cc/quads/draw_quad.h" |   10 #include "cc/quads/draw_quad.h" | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   45  |   45  | 
|   46   if (!ProcessForCALayerOverlays(resource_provider, |   46   if (!ProcessForCALayerOverlays(resource_provider, | 
|   47                                  gfx::RectF(render_pass->output_rect), |   47                                  gfx::RectF(render_pass->output_rect), | 
|   48                                  render_pass->quad_list, ca_layer_overlays)) |   48                                  render_pass->quad_list, ca_layer_overlays)) | 
|   49     return false; |   49     return false; | 
|   50  |   50  | 
|   51   // CALayer overlays are all-or-nothing. If all quads were replaced with |   51   // CALayer overlays are all-or-nothing. If all quads were replaced with | 
|   52   // layers then clear the list and remove the backbuffer from the overcandidate |   52   // layers then clear the list and remove the backbuffer from the overcandidate | 
|   53   // list. |   53   // list. | 
|   54   overlay_candidates->clear(); |   54   overlay_candidates->clear(); | 
|   55   render_pass->quad_list.clear(); |  | 
|   56   overlay_damage_rect_ = render_pass->output_rect; |   55   overlay_damage_rect_ = render_pass->output_rect; | 
|   57   *damage_rect = gfx::Rect(); |   56   *damage_rect = gfx::Rect(); | 
|   58   return true; |   57   return true; | 
|   59 } |   58 } | 
|   60  |   59  | 
|   61 void OverlayProcessor::ProcessForOverlays(ResourceProvider* resource_provider, |   60 void OverlayProcessor::ProcessForOverlays(ResourceProvider* resource_provider, | 
|   62                                           RenderPass* render_pass, |   61                                           RenderPass* render_pass, | 
|   63                                           OverlayCandidateList* candidates, |   62                                           OverlayCandidateList* candidates, | 
|   64                                           CALayerOverlayList* ca_layer_overlays, |   63                                           CALayerOverlayList* ca_layer_overlays, | 
|   65                                           gfx::Rect* damage_rect) { |   64                                           gfx::Rect* damage_rect) { | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  116   } |  115   } | 
|  117  |  116  | 
|  118   if (this_frame_underlay_rect == previous_frame_underlay_rect_) |  117   if (this_frame_underlay_rect == previous_frame_underlay_rect_) | 
|  119     damage_rect->Subtract(this_frame_underlay_rect); |  118     damage_rect->Subtract(this_frame_underlay_rect); | 
|  120   previous_frame_underlay_rect_ = this_frame_underlay_rect; |  119   previous_frame_underlay_rect_ = this_frame_underlay_rect; | 
|  121  |  120  | 
|  122   damage_rect->Union(output_surface_overlay_damage_rect); |  121   damage_rect->Union(output_surface_overlay_damage_rect); | 
|  123 } |  122 } | 
|  124  |  123  | 
|  125 }  // namespace cc |  124 }  // namespace cc | 
| OLD | NEW |