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

Unified Diff: cc/output/overlay_processor.cc

Issue 2693023002: Use SwapBuffersWithBounds on Chromecast (Closed)
Patch Set: Created 3 years, 10 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
Index: cc/output/overlay_processor.cc
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc
index 8a1a9e7fd73cd727fc971973b8612d64c85c77b3..9c7bf4cd4686e874d0d15dbb52ebb564e95a35e4 100644
--- a/cc/output/overlay_processor.cc
+++ b/cc/output/overlay_processor.cc
@@ -39,6 +39,9 @@ class SendPromotionHintsBeforeReturning {
namespace cc {
+void OverlayProcessor::Strategy::GetContentBounds(
+ std::vector<gfx::Rect>* bounds) {}
+
OverlayProcessor::OverlayProcessor(OutputSurface* surface) : surface_(surface) {
}
@@ -58,6 +61,13 @@ gfx::Rect OverlayProcessor::GetAndResetOverlayDamage() {
return result;
}
+void OverlayProcessor::GetContentBounds(
+ std::vector<gfx::Rect>* content_bounds) {
+ DCHECK(content_bounds);
+ content_bounds->insert(content_bounds->end(), content_bounds_.begin(),
danakj 2017/02/14 17:28:58 why append and not replace the contents?
halliwell 2017/02/15 22:29:04 This function removed now.
+ content_bounds_.end());
+}
+
bool OverlayProcessor::ProcessForCALayers(
ResourceProvider* resource_provider,
RenderPass* render_pass,
@@ -100,6 +110,7 @@ void OverlayProcessor::ProcessForOverlays(
// they are not promotable.
SendPromotionHintsBeforeReturning notifier(resource_provider, candidates);
#endif
+ content_bounds_.clear();
// If we have any copy requests, we can't remove any quads for overlays or
// CALayers because the framebuffer would be missing the removed quads'
@@ -124,6 +135,7 @@ void OverlayProcessor::ProcessForOverlays(
continue;
UpdateDamageRect(candidates, damage_rect);
+ strategy->GetContentBounds(&content_bounds_);
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698