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

Unified Diff: cc/quads/io_surface_draw_quad.cc

Issue 20667002: cc: Add frame data to LTHI tracing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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/quads/io_surface_draw_quad.h ('k') | cc/quads/picture_draw_quad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/io_surface_draw_quad.cc
diff --git a/cc/quads/io_surface_draw_quad.cc b/cc/quads/io_surface_draw_quad.cc
index 1bbf8a4e3ddc740e942e10a781dd5e6371a7330e..2c986dd3a23f41935eb5d368813504015fa68586 100644
--- a/cc/quads/io_surface_draw_quad.cc
+++ b/cc/quads/io_surface_draw_quad.cc
@@ -5,6 +5,8 @@
#include "cc/quads/io_surface_draw_quad.h"
#include "base/logging.h"
+#include "base/values.h"
+#include "cc/base/math_util.h"
namespace cc {
@@ -58,4 +60,20 @@ const IOSurfaceDrawQuad* IOSurfaceDrawQuad::MaterialCast(
return static_cast<const IOSurfaceDrawQuad*>(quad);
}
+void IOSurfaceDrawQuad::ExtendValue(base::DictionaryValue* value) const {
+ value->Set("io_surface_size", MathUtil::AsValue(io_surface_size).release());
+ value->SetInteger("io_surface_resource_id", io_surface_resource_id);
+ const char* orientation_string = NULL;
+ switch (orientation) {
+ case FLIPPED:
+ orientation_string = "flipped";
+ break;
+ case UNFLIPPED:
+ orientation_string = "unflipped";
+ break;
+ }
+
+ value->SetString("orientation", orientation_string);
+}
+
} // namespace cc
« no previous file with comments | « cc/quads/io_surface_draw_quad.h ('k') | cc/quads/picture_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698