Skip to content

Commit

Permalink
[Tizen] Force full repaint if no damage region was provided
Browse files Browse the repository at this point in the history
  • Loading branch information
swift-kim committed Mar 6, 2023
1 parent 3a1a4b0 commit 20c2411
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions shell/platform/embedder/embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,19 +339,18 @@ InferOpenGLPlatformViewCreationCallback(
populate_existing_damage(user_data, id, &existing_damage);

bool partial_repaint_enabled = true;
SkIRect existing_damage_rect;
std::optional<SkIRect> existing_damage_rect;

// Verify that at least one damage rectangle was provided.
if (existing_damage.num_rects <= 0 || existing_damage.damage == nullptr) {
FML_LOG(INFO) << "No damage was provided. Forcing full repaint.";
existing_damage_rect = SkIRect::MakeEmpty();
existing_damage_rect = std::nullopt;
partial_repaint_enabled = false;
} else if (existing_damage.num_rects > 1) {
// Log message notifying users that multi-damage is not yet available in
// case they try to make use of it.
FML_LOG(INFO) << "Damage with multiple rectangles not yet supported. "
"Repainting the whole frame.";
existing_damage_rect = SkIRect::MakeEmpty();
existing_damage_rect = std::nullopt;
partial_repaint_enabled = false;
} else {
existing_damage_rect = FlutterRectToSkIRect(*(existing_damage.damage));
Expand Down

0 comments on commit 20c2411

Please sign in to comment.