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

Unified Diff: components/exo/surface.cc

Issue 2755463002: [cc] Fix CompositorFrameSinkSupport BeginFrameAck interface. (Closed)
Patch Set: sync Created 3 years, 9 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: components/exo/surface.cc
diff --git a/components/exo/surface.cc b/components/exo/surface.cc
index bdcd746536ddccae9d57dc5d578742f4868d6c1b..b213ba1dd1cf37712aee2c13e65162e6df0aa7eb 100644
--- a/components/exo/surface.cc
+++ b/components/exo/surface.cc
@@ -838,7 +838,14 @@ void Surface::UpdateSurface(bool full_damage) {
quad_state->opacity = state_.alpha;
cc::CompositorFrame frame;
- current_begin_frame_ack_.has_damage = true;
+ // If we commit while we don't have an active BeginFrame, we acknowledge a
+ // manual one.
+ if (current_begin_frame_ack_.sequence_number ==
+ cc::BeginFrameArgs::kInvalidFrameNumber) {
+ current_begin_frame_ack_ = cc::BeginFrameAck::CreateManualAckWithDamage();
+ } else {
+ current_begin_frame_ack_.has_damage = true;
+ }
frame.metadata.begin_frame_ack = current_begin_frame_ack_;
if (current_resource_.id) {

Powered by Google App Engine
This is Rietveld 408576698