Index: cc/base/region.cc |
diff --git a/cc/base/region.cc b/cc/base/region.cc |
index 906bc6e3c9d1e6f0ccce6445e078015e4754b78a..79c30ec8251a0b0b881aed2ba304bbcc63eb64ba 100644 |
--- a/cc/base/region.cc |
+++ b/cc/base/region.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "cc/base/region.h" |
+#include "base/debug/trace_event_argument.h" |
#include "base/values.h" |
namespace cc { |
@@ -120,6 +121,16 @@ scoped_ptr<base::Value> Region::AsValue() const { |
return result.PassAs<base::Value>(); |
} |
+void Region::AsValueInto(base::debug::TracedValue* result) const { |
+ for (Iterator it(*this); it.has_rect(); it.next()) { |
+ gfx::Rect rect(it.rect()); |
+ result->AppendInteger(rect.x()); |
+ result->AppendInteger(rect.y()); |
+ result->AppendInteger(rect.width()); |
+ result->AppendInteger(rect.height()); |
+ } |
+} |
+ |
Region::Iterator::Iterator() { |
} |