| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkColor.h" | 8 #include "SkColor.h" |
| 9 | 9 |
| 10 struct MHD_Connection; | 10 struct MHD_Connection; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 * /colorMode/2 turns on FP16. | 135 * /colorMode/2 turns on FP16. |
| 136 */ | 136 */ |
| 137 class ColorModeHandler : public UrlHandler { | 137 class ColorModeHandler : public UrlHandler { |
| 138 public: | 138 public: |
| 139 bool canHandle(const char* method, const char* url) override; | 139 bool canHandle(const char* method, const char* url) override; |
| 140 int handle(Request* request, MHD_Connection* connection, | 140 int handle(Request* request, MHD_Connection* connection, |
| 141 const char* url, const char* method, | 141 const char* url, const char* method, |
| 142 const char* upload_data, size_t* upload_data_size) override; | 142 const char* upload_data, size_t* upload_data_size) override; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 /** | |
| 146 * Controls the global sRGB flag (is SkColor treated as sRGB or not). | |
| 147 * Posting to /srgbMode/0 causes SkColor to be linear, /colorMode/1 | |
| 148 * causes SkColor to be sRGB; | |
| 149 */ | |
| 150 class SRGBModeHandler : public UrlHandler { | |
| 151 public: | |
| 152 bool canHandle(const char* method, const char* url) override; | |
| 153 int handle(Request* request, MHD_Connection* connection, | |
| 154 const char* url, const char* method, | |
| 155 const char* upload_data, size_t* upload_data_size) override; | |
| 156 }; | |
| 157 | |
| 158 class QuitHandler : public UrlHandler { | 145 class QuitHandler : public UrlHandler { |
| 159 public: | 146 public: |
| 160 bool canHandle(const char* method, const char* url) override; | 147 bool canHandle(const char* method, const char* url) override; |
| 161 int handle(Request* request, MHD_Connection* connection, | 148 int handle(Request* request, MHD_Connection* connection, |
| 162 const char* url, const char* method, | 149 const char* url, const char* method, |
| 163 const char* upload_data, size_t* upload_data_size) override; | 150 const char* upload_data, size_t* upload_data_size) override; |
| 164 }; | 151 }; |
| 165 | 152 |
| OLD | NEW |