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

Unified Diff: gm/textblobgeometrychange.cpp

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase 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
Index: gm/textblobgeometrychange.cpp
diff --git a/gm/textblobgeometrychange.cpp b/gm/textblobgeometrychange.cpp
index 0632908dfbfa8ee2ffb8fffdd001a6e4f6713f78..b1c5b179880663716864060e1d812a58c719fa0f 100644
--- a/gm/textblobgeometrychange.cpp
+++ b/gm/textblobgeometrychange.cpp
@@ -42,8 +42,11 @@ protected:
SkAutoTUnref<const SkTextBlob> blob(builder.build());
- SkImageInfo info = SkImageInfo::MakeN32Premul(200, 200);
- SkSurfaceProps props(0, kUnknown_SkPixelGeometry);
+ SkImageInfo info = SkImageInfo::MakeN32Premul(200, 200, canvas->imageInfo().profileType());
+ SkSurfaceProps canvasProps(SkSurfaceProps::kLegacyFontHost_InitType);
+ uint32_t allowSRGBInputs = canvas->getProps(&canvasProps)
+ ? canvasProps.flags() & SkSurfaceProps::kAllowSRGBInputs_Flag : 0;
+ SkSurfaceProps props(allowSRGBInputs, kUnknown_SkPixelGeometry);
auto surface(canvas->makeSurface(info, &props));
if (surface) {
SkCanvas* c = surface->getCanvas();
« no previous file with comments | « gm/surface.cpp ('k') | gm/textblobmixedsizes.cpp » ('j') | src/effects/SkImageSource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698