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

Unified Diff: cc/base/math_util.h

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 5 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 | « base/debug/trace_event_impl.h ('k') | cc/base/math_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/math_util.h
diff --git a/cc/base/math_util.h b/cc/base/math_util.h
index 3af2102152098df6b4890f1446061cc26ee4a9b8..4301add40c2e52b29aba980ce13150124824c653 100644
--- a/cc/base/math_util.h
+++ b/cc/base/math_util.h
@@ -17,7 +17,12 @@
#include "ui/gfx/size.h"
#include "ui/gfx/transform.h"
-namespace base { class Value; }
+namespace base {
+class Value;
+namespace debug {
+class TracedValue;
+}
+}
namespace gfx {
class QuadF;
@@ -174,21 +179,35 @@ class CC_EXPORT MathUtil {
// Conversion to value.
static scoped_ptr<base::Value> AsValue(const gfx::Size& s);
- static scoped_ptr<base::Value> AsValue(const gfx::SizeF& s);
static scoped_ptr<base::Value> AsValue(const gfx::Rect& r);
static bool FromValue(const base::Value*, gfx::Rect* out_rect);
static scoped_ptr<base::Value> AsValue(const gfx::PointF& q);
- static scoped_ptr<base::Value> AsValue(const gfx::Point3F&);
- static scoped_ptr<base::Value> AsValue(const gfx::Vector2d& v);
- static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
- static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect);
- static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform);
- static scoped_ptr<base::Value> AsValue(const gfx::BoxF& box);
+
+ static void AddToTracedValue(const gfx::Size& s,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::SizeF& s,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::Rect& r,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::PointF& q,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::Point3F&,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::Vector2d& v,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::QuadF& q,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::RectF& rect,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::Transform& transform,
+ base::debug::TracedValue* res);
+ static void AddToTracedValue(const gfx::BoxF& box,
+ base::debug::TracedValue* res);
// Returns a base::Value representation of the floating point value.
// If the value is inf, returns max double/float representation.
- static scoped_ptr<base::Value> AsValueSafely(double value);
- static scoped_ptr<base::Value> AsValueSafely(float value);
+ static double AsDoubleSafely(double value);
+ static float AsFloatSafely(float value);
};
} // namespace cc
« no previous file with comments | « base/debug/trace_event_impl.h ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698