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

Unified Diff: cc/base/region.cc

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 | « cc/base/region.h ('k') | cc/debug/frame_viewer_instrumentation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
}
« no previous file with comments | « cc/base/region.h ('k') | cc/debug/frame_viewer_instrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698