@@ -331,7 +331,7 @@ InferOpenGLPlatformViewCreationCallback(
331331 return flutter::GLFBOInfo{
332332 .fbo_id = static_cast <uint32_t >(id),
333333 .partial_repaint_enabled = false ,
334- .existing_damage = SkIRect::MakeEmpty () ,
334+ .existing_damage = std:: nullopt ,
335335 };
336336 }
337337
@@ -340,19 +340,18 @@ InferOpenGLPlatformViewCreationCallback(
340340 populate_existing_damage (user_data, id, &existing_damage);
341341
342342 bool partial_repaint_enabled = true ;
343- SkIRect existing_damage_rect;
343+ std::optional< SkIRect> existing_damage_rect;
344344
345345 // Verify that at least one damage rectangle was provided.
346346 if (existing_damage.num_rects <= 0 || existing_damage.damage == nullptr ) {
347- FML_LOG (INFO) << " No damage was provided. Forcing full repaint." ;
348- existing_damage_rect = SkIRect::MakeEmpty ();
347+ existing_damage_rect = std::nullopt ;
349348 partial_repaint_enabled = false ;
350349 } else if (existing_damage.num_rects > 1 ) {
351350 // Log message notifying users that multi-damage is not yet available in
352351 // case they try to make use of it.
353352 FML_LOG (INFO) << " Damage with multiple rectangles not yet supported. "
354353 " Repainting the whole frame." ;
355- existing_damage_rect = SkIRect::MakeEmpty () ;
354+ existing_damage_rect = std:: nullopt ;
356355 partial_repaint_enabled = false ;
357356 } else {
358357 existing_damage_rect = FlutterRectToSkIRect (*(existing_damage.damage ));
0 commit comments