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

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

Issue 1745063002: Render batch bounds as stroke rects (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: tweaks 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/UrlHandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
diff --git a/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp b/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
similarity index 54%
copy from tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp
copy to tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
index 4ab5096a1b703dbb3612efb9235646a33789722b..40449868bfc8afce5ebee7edebfdb7b8acd21708 100644
--- a/tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp
+++ b/tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp
@@ -13,15 +13,15 @@
using namespace Response;
-bool ClipAlphaHandler::canHandle(const char* method, const char* url) {
- static const char* kBasePath = "/clipAlpha/";
+bool BatchBoundsHandler::canHandle(const char* method, const char* url) {
+ static const char* kBasePath = "/batchBounds/";
return 0 == strcmp(method, MHD_HTTP_METHOD_POST) &&
0 == strncmp(url, kBasePath, strlen(kBasePath));
}
-int ClipAlphaHandler::handle(Request* request, MHD_Connection* connection,
- const char* url, const char* method,
- const char* upload_data, size_t* upload_data_size) {
+int BatchBoundsHandler::handle(Request* request, MHD_Connection* connection,
+ const char* url, const char* method,
+ const char* upload_data, size_t* upload_data_size) {
SkTArray<SkString> commands;
SkStrSplit(url, "/", &commands);
@@ -29,10 +29,10 @@ int ClipAlphaHandler::handle(Request* request, MHD_Connection* connection,
return MHD_NO;
}
- int alpha;
- sscanf(commands[1].c_str(), "%d", &alpha);
+ int enabled;
+ sscanf(commands[1].c_str(), "%d", &enabled);
- request->fDebugCanvas->setClipVizColor(SkColorSetARGB(alpha, 0, 0, 0));
+ request->fDebugCanvas->setDrawGpuBatchBounds(enabled);
return SendOK(connection);
}
« no previous file with comments | « tools/skiaserve/skiaserve.cpp ('k') | tools/skiaserve/urlhandlers/UrlHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698