| Index: cc/output/overlay_processor.cc
|
| diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc
|
| index 88523d63033d86a45aa37d02c53e7f5e991364e0..cec4babb661bacc0ba02d62cda65c467706fa040 100644
|
| --- a/cc/output/overlay_processor.cc
|
| +++ b/cc/output/overlay_processor.cc
|
| @@ -39,6 +39,10 @@ class SendPromotionHintsBeforeReturning {
|
|
|
| namespace cc {
|
|
|
| +bool OverlayProcessor::Strategy::GetSwapWithDamageRect(gfx::Rect* rect) {
|
| + return false;
|
| +}
|
| +
|
| OverlayProcessor::OverlayProcessor(OutputSurface* surface) : surface_(surface) {
|
| }
|
|
|
| @@ -88,6 +92,7 @@ void OverlayProcessor::ProcessForOverlays(ResourceProvider* resource_provider,
|
| OverlayCandidateList* candidates,
|
| CALayerOverlayList* ca_layer_overlays,
|
| gfx::Rect* damage_rect) {
|
| + have_swap_with_damage_rect_ = false;
|
| #if defined(OS_ANDROID)
|
| // Be sure to send out notifications, regardless of whether we get to
|
| // processing for overlays or not. If we don't, then we should notify that
|
| @@ -116,11 +121,20 @@ void OverlayProcessor::ProcessForOverlays(ResourceProvider* resource_provider,
|
| if (!strategy->Attempt(resource_provider, render_pass, candidates))
|
| continue;
|
|
|
| + have_swap_with_damage_rect_ =
|
| + strategy->GetSwapWithDamageRect(&swap_with_damage_rect_);
|
| +
|
| UpdateDamageRect(candidates, damage_rect);
|
| return;
|
| }
|
| }
|
|
|
| +bool OverlayProcessor::GetSwapWithDamageRect(gfx::Rect* damage_rect) {
|
| + DCHECK(damage_rect);
|
| + *damage_rect = swap_with_damage_rect_;
|
| + return have_swap_with_damage_rect_;
|
| +}
|
| +
|
| // Subtract on-top overlays from the damage rect, unless the overlays use
|
| // the backbuffer as their content (in which case, add their combined rect
|
| // back to the damage at the end).
|
|
|