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

Unified Diff: ui/gfx/box_f.cc

Issue 55763004: Allow the computation of inflated bounds for non matrix transform operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | « ui/gfx/box_f.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/box_f.cc
diff --git a/ui/gfx/box_f.cc b/ui/gfx/box_f.cc
index b4191f36bb32b71b806fe1043f13bba2fef13d22..62e755bdc3e2d061a6eab6cdac6a2f0b01777c70 100644
--- a/ui/gfx/box_f.cc
+++ b/ui/gfx/box_f.cc
@@ -50,14 +50,17 @@ void BoxF::Union(const BoxF& box) {
}
if (box.IsEmpty())
return;
-
- ExpandTo(box.origin(), gfx::Point3F(box.right(), box.bottom(), box.front()));
+ ExpandTo(box);
}
void BoxF::ExpandTo(const Point3F& point) {
ExpandTo(point, point);
}
+void BoxF::ExpandTo(const BoxF& box) {
+ ExpandTo(box.origin(), gfx::Point3F(box.right(), box.bottom(), box.front()));
+}
+
BoxF UnionBoxes(const BoxF& a, const BoxF& b) {
BoxF result = a;
result.Union(b);
« no previous file with comments | « ui/gfx/box_f.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698