10#include "microhttpd.h"
19 static const char* kBasePath =
"/gpuOpBounds/";
20 return 0 == strcmp(method, MHD_HTTP_METHOD_POST) &&
21 0 == strncmp(url, kBasePath, strlen(kBasePath));
25 const char* method,
const char* upload_data,
size_t* upload_data_size) {
29 if (!request->hasPicture() ||
commands.size() != 2) {
34 sscanf(
commands[1].c_str(),
"%d", &enabled);
36 request->fDebugCanvas->setDrawGpuOpBounds(
SkToBool(enabled));
void SkStrSplit(const char *str, const char *delimiters, SkStrSplitMode splitMode, TArray< SkString > *out)
static constexpr bool SkToBool(const T &x)
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)