| 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);
|
| }
|
|
|
|
|