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

Unified Diff: tools/skiaserve/urlhandlers/PostHandler.cpp

Issue 1741043003: A bit more privacy for SkiaServe's Request (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 10 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 | « tools/skiaserve/urlhandlers/ImgHandler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/urlhandlers/PostHandler.cpp
diff --git a/tools/skiaserve/urlhandlers/PostHandler.cpp b/tools/skiaserve/urlhandlers/PostHandler.cpp
index 7cdbf295c609c93ac5ea1024615f2e3d02b0f43f..ce599200b28578829013637af3eb8159aa651249 100644
--- a/tools/skiaserve/urlhandlers/PostHandler.cpp
+++ b/tools/skiaserve/urlhandlers/PostHandler.cpp
@@ -62,19 +62,11 @@ int PostHandler::handle(Request* request, MHD_Connection* connection,
MHD_destroy_post_processor(uc->fPostProcessor);
uc->fPostProcessor = nullptr;
- // parse picture from stream
- request->fPicture.reset(
- SkPicture::CreateFromStream(request->fUploadContext->fStream.detachAsStream()));
- if (!request->fPicture.get()) {
+ if (!request->initPictureFromStream(request->fUploadContext->fStream.detachAsStream())) {
fprintf(stderr, "Could not create picture from stream.\n");
return MHD_NO;
}
-
- // pour picture into debug canvas
- request->fDebugCanvas.reset(new SkDebugCanvas(Request::kImageWidth,
- Request::kImageHeight));
- request->fDebugCanvas->drawPicture(request->fPicture);
-
+
// clear upload context
delete request->fUploadContext;
request->fUploadContext = nullptr;
« no previous file with comments | « tools/skiaserve/urlhandlers/ImgHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698