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

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

Issue 1741823002: Get SkiaServe Request started off with a little privacy (Closed) Base URL: https://skia.googlesource.com/skia@skiaserve-7-wireup
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/skiaserve.cpp ('k') | tools/skiaserve/urlhandlers/InfoHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
diff --git a/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp b/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
index 2dc9bb60c6cbe0712700da4b74720100aa7f307e..b5d0c7a245441499e0ba62ed4124ae82e87a901a 100644
--- a/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
+++ b/tools/skiaserve/urlhandlers/EnableGPUHandler.cpp
@@ -32,17 +32,10 @@ int EnableGPUHandler::handle(Request* request, MHD_Connection* connection,
int enable;
sscanf(commands[1].c_str(), "%d", &enable);
- if (enable) {
- SkSurface* surface = request->createGPUSurface();
- if (surface) {
- request->fSurface.reset(surface);
- request->fGPUEnabled = true;
- return SendOK(connection);
- }
+ bool success = request->enableGPU(enable);
+ if (!success) {
return SendError(connection, "Unable to create GPU surface");
}
- request->fSurface.reset(request->createCPUSurface());
- request->fGPUEnabled = false;
return SendOK(connection);
}
« no previous file with comments | « tools/skiaserve/skiaserve.cpp ('k') | tools/skiaserve/urlhandlers/InfoHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698