aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve/Request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/skiaserve/Request.cpp')
-rw-r--r--tools/skiaserve/Request.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index 58aca84b53..7cbc9ef212 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());