Skip to content

Commit 6372d48

Browse files
authored
android: Fix DCHECK in video geometry change (#9297)
Update video geometry processing to use gfx::ToEnclosedRect(). This aligns the calculated bounds with OverlayProcessorAndroid.cc to prevent DCHECK failures caused by inconsistent video overlay geometry on the Android platform. Issue: 488394860
1 parent 069fcfe commit 6372d48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

media/mojo/services/starboard/starboard_renderer_wrapper.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ void StarboardRendererWrapper::OnVideoGeometryChange(
205205
const gfx::RectF& rect_f,
206206
gfx::OverlayTransform /* transform */) {
207207
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
208-
gfx::Rect new_bounds = gfx::ToNearestRect(rect_f);
208+
// Use gfx::ToEnclosedRect() to align with `NotifyOverlayPromotion()`
209+
// in //components/viz/service/display/overlay_processor_android.cc.
210+
gfx::Rect new_bounds = gfx::ToEnclosedRect(rect_f);
209211
GetRenderer()->OnVideoGeometryChange(new_bounds);
210212
}
211213

0 commit comments

Comments
 (0)