10#include "microhttpd.h"
19 static const char* kBasePath =
"/clipAlpha/";
20 return 0 == strcmp(method, MHD_HTTP_METHOD_POST) &&
21 0 == strncmp(url, kBasePath, strlen(kBasePath));
25 const char* url,
const char* method,
26 const char* upload_data,
size_t* upload_data_size) {
30 if (!request->hasPicture() ||
commands.size() != 2) {
35 sscanf(
commands[1].c_str(),
"%d", &alpha);
37 request->fDebugCanvas->setClipVizColor(
SkColorSetARGB(alpha, 0, 0, 0));
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
void SkStrSplit(const char *str, const char *delimiters, SkStrSplitMode splitMode, TArray< SkString > *out)
bool canHandle(const char *method, const char *url) override
int handle(Request *request, MHD_Connection *connection, const char *url, const char *method, const char *upload_data, size_t *upload_data_size) override
int SendOK(MHD_Connection *connection)