6 Commits

Author SHA1 Message Date
Adam Barth
7228761ef7 Serialize SkPictures to the file system
This CL teaches the Sky compositor how to serialize SkPictures to the file
system so that we can study them in the Skia picture debugger.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/853863003
2015-01-21 16:27:28 -08:00
Adam Barth
407fb582bd Sky should use an SkPicture when drawing
This CL teaches the Sky compositor to record an SkPicture instead of just
drawing in immediate mode. Using an SkPicture will let us experiment with
various optimizations in Skia that preprocess the SkPicture before translating
the Skia commands to GL commands.

This CL also refactors the "display delegate" system now that we can hand off
an SkPicture to a rasterization backend. The new design requires fewer
backpointers and removes the static display delegate factory.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/854303002
2015-01-19 18:47:53 -08:00
Ojan Vafai
0fcf250d03 Make reftests work for sky.
-Add a --testing flag to sky_viewer and cause it to paint into an
SkBitmap instead of a ganesh surface so we can get the pixels out.
-Add GetPixelsForTesting to layer.cc to actually grab out the pixels.
-Add a reftest and a mismatch reftest. They need a setTimeout after
the load event. Unclear why or what the right fix is. Maybe we should
give internals some way to force the paint? If we don't have the
setTimeout, we paint a white page (so we do a paint, but with no
content).
-Add a DisplayDelegate to Layer so that Viewer can decide whether
to use the real ganesh backend or the SkBitmap one without littering
the whole code-base with is_testing bools and logic.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/797063002
2014-12-12 16:45:49 -08:00
Adam Barth
93d4190547 Add some trace events to Sky compositor
This CL adds some basic trace events to the Sky compositor so we can see what's
going on.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/757643002
2014-11-24 09:54:28 -08:00
Adam Barth
cc9da50737 Enable the Sky compositor
Turns out we need to reset the context before switching back to drawing with
Ganesh (i.e., call resetContext on the GrContext) to clean out whatever state we've
changed in the GL context. Now the city-list and the flights-app demos work.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/752653002
2014-11-21 09:57:47 -08:00
Adam Barth
59f18e7ef2 Add a simple compositor for Sky
Currently we're only able to put up one frame and we can have only one layer, but
this is enough to draw a green circle in a sample app. A future CL will wire this
up to Sky and add support for drawing a second frame.

R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/740923002
2014-11-20 14:10:40 -08:00