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

Unified Diff: cc/nine_patch_layer_impl.cc

Issue 11446076: Added LayerTreeHostImpl::layerTreeAsJson which serializes a layer tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/nine_patch_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/nine_patch_layer_impl.cc
diff --git a/cc/nine_patch_layer_impl.cc b/cc/nine_patch_layer_impl.cc
index 46a8af270a21b6da23fdd29030d9890af4264e70..d715fe68c473eee4284f9c8a1ee012909c52b466 100644
--- a/cc/nine_patch_layer_impl.cc
+++ b/cc/nine_patch_layer_impl.cc
@@ -5,6 +5,7 @@
#include "nine_patch_layer_impl.h"
#include "base/stringprintf.h"
+#include "base/values.h"
#include "cc/quad_sink.h"
#include "cc/texture_draw_quad.h"
#include "ui/gfx/rect_f.h"
@@ -163,4 +164,18 @@ void NinePatchLayerImpl::dumpLayerProperties(std::string* str, int indent) const
LayerImpl::dumpLayerProperties(str, indent);
}
+base::DictionaryValue* NinePatchLayerImpl::layerTreeAsJson() const
+{
+ base::DictionaryValue* result = LayerImpl::layerTreeAsJson();
+
+ base::ListValue* list = new base::ListValue;
+ list->AppendInteger(m_imageAperture.origin().x());
+ list->AppendInteger(m_imageAperture.origin().y());
+ list->AppendInteger(m_imageAperture.size().width());
+ list->AppendInteger(m_imageAperture.size().height());
+ result->Set("ImageAperture", list);
+
+ return result;
+}
+
}
« no previous file with comments | « cc/nine_patch_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698