| Index: tools/skiaserve/Request.cpp
|
| diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
|
| index 58aca84b53bbf0dc0f2b8164afdb073b7ef84de5..7cbc9ef212d9a80a99be06c90352ec8fb25c28a3 100644
|
| --- a/tools/skiaserve/Request.cpp
|
| +++ b/tools/skiaserve/Request.cpp
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "SkPictureRecorder.h"
|
| #include "SkPixelSerializer.h"
|
| +#include "SkPM4fPriv.h"
|
| #include "picture_utils.h"
|
|
|
| using namespace sk_gpu_test;
|
| @@ -186,6 +187,11 @@ bool Request::setColorMode(int mode) {
|
| return enableGPU(fGPUEnabled);
|
| }
|
|
|
| +bool Request::setSRGBMode(bool enable) {
|
| + gTreatSkColorAsSRGB = enable;
|
| + return true;
|
| +}
|
| +
|
| bool Request::enableGPU(bool enable) {
|
| if (enable) {
|
| SkSurface* surface = this->createGPUSurface();
|
| @@ -238,6 +244,7 @@ SkData* Request::getJsonOps(int n) {
|
| root["mode"] = Json::Value(fGPUEnabled ? "gpu" : "cpu");
|
| root["drawGpuBatchBounds"] = Json::Value(fDebugCanvas->getDrawGpuBatchBounds());
|
| root["colorMode"] = Json::Value(fColorMode);
|
| + root["srgbMode"] = Json::Value(gTreatSkColorAsSRGB);
|
| SkDynamicMemoryWStream stream;
|
| stream.writeText(Json::FastWriter().write(root).c_str());
|
|
|
|
|