Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / cc / base / region.cc
index 906bc6e..79c30ec 100644 (file)
@@ -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() {
 }