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

Unified Diff: ui/ozone/platform/drm/gbm_surface_factory.cc

Issue 1110813002: Fix assert in GetOverlayRect when transforming video with Ozone overlay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some nits. Created 5 years, 8 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
« no previous file with comments | « cc/output/overlay_candidate_validator.h ('k') | ui/ozone/public/overlay_candidates_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gbm_surface_factory.cc
diff --git a/ui/ozone/platform/drm/gbm_surface_factory.cc b/ui/ozone/platform/drm/gbm_surface_factory.cc
index 8ecf724844d43f1246fd761c22ccedd8d3f05ee4..0580a2c93105b5f3c59df6823bd6ffc09d0f452b 100644
--- a/ui/ozone/platform/drm/gbm_surface_factory.cc
+++ b/ui/ozone/platform/drm/gbm_surface_factory.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "third_party/khronos/EGL/egl.h"
+#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/ozone/common/egl_util.h"
#include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
#include "ui/ozone/platform/drm/gpu/drm_window.h"
@@ -47,8 +48,11 @@ class SingleOverlay : public OverlayCandidatesOzone {
NOTREACHED();
return;
}
+ // 0.01 constant chosen to match DCHECKs in gfx::ToNearestRect and avoid
+ // that code asserting on quads that we accept.
if (overlay->plane_z_order > 0 &&
- IsTransformSupported(overlay->transform)) {
+ IsTransformSupported(overlay->transform) &&
+ gfx::IsNearestRectWithinDistance(overlay->display_rect, 0.01f)) {
overlay->overlay_handled = true;
}
}
« no previous file with comments | « cc/output/overlay_candidate_validator.h ('k') | ui/ozone/public/overlay_candidates_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698