| Index: tools/skiaserve/Request.cpp
|
| diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
|
| index 4d256d56d87260af82172ad0cdeb87a408f9f278..c5a36cbae025d34a9aa5910a3a682d709799130b 100644
|
| --- a/tools/skiaserve/Request.cpp
|
| +++ b/tools/skiaserve/Request.cpp
|
| @@ -136,6 +136,20 @@ bool Request::enableGPU(bool enable) {
|
| fSurface.reset(this->createCPUSurface());
|
| fGPUEnabled = false;
|
| return true;
|
| +}
|
| +
|
| +bool Request::initPictureFromStream(SkStream* stream) {
|
| + // parse picture from stream
|
| + fPicture.reset(SkPicture::CreateFromStream(stream));
|
| + if (!fPicture.get()) {
|
| + fprintf(stderr, "Could not create picture from stream.\n");
|
| + return false;
|
| + }
|
| +
|
| + // pour picture into debug canvas
|
| + fDebugCanvas.reset(new SkDebugCanvas(kImageWidth, Request::kImageHeight));
|
| + fDebugCanvas->drawPicture(fPicture);
|
| + return true;
|
| }
|
|
|
| SkData* Request::getJsonOps(int n) {
|
|
|