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

Unified Diff: sky/compositor/layer.cc

Issue 853863003: Serialize SkPictures to the file system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/compositor/BUILD.gn ('k') | sky/compositor/picture_serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/layer.cc
diff --git a/sky/compositor/layer.cc b/sky/compositor/layer.cc
index c1bac833b6c36676dbc99ab4de9df1018df94b2a..006206d347218f985ba054aa5a3e2a7158dfae36 100644
--- a/sky/compositor/layer.cc
+++ b/sky/compositor/layer.cc
@@ -6,6 +6,7 @@
#include "base/debug/trace_event.h"
#include "sky/compositor/layer_host.h"
+#include "sky/compositor/picture_serializer.h"
#include "sky/compositor/rasterizer.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
@@ -26,6 +27,12 @@ void Layer::Display() {
TRACE_EVENT0("sky", "Layer::Display");
DCHECK(rasterizer_);
auto picture = RecordPicture();
+
+#if 0
+ SerializePicture(
+ "/data/data/org.chromium.mojo.shell/cache/layer0.skp", picture.get());
+#endif
+
texture_ = rasterizer_->Rasterize(picture.get());
}
« no previous file with comments | « sky/compositor/BUILD.gn ('k') | sky/compositor/picture_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698