Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: tools/skiaserve/Request.cpp

Issue 1902143002: Adding support for controlling the global sRGB SkColor switch. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skiaserve/Request.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « tools/skiaserve/Request.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698