diff options
author | Matt Sarett <msarett@google.com> | 2017-02-07 13:56:11 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-07 19:33:37 +0000 |
commit | 77a7a1b57c16c97f056c1e50c03bdc954947778c (patch) | |
tree | 15ffacdee0ba8b0a0c8ac244302ef10ead4f915e /tools/viewer/sk_app | |
parent | 4f51aa57eaa4187696f7830ee7bdac096bc47ccc (diff) |
SkColorSpace: remove named API, add gamut API
Reland from: https://skia-review.googlesource.com/c/8021/
BUG=skia:
Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a
Reviewed-on: https://skia-review.googlesource.com/8136
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'tools/viewer/sk_app')
-rw-r--r-- | tools/viewer/sk_app/VulkanWindowContext.cpp | 2 | ||||
-rw-r--r-- | tools/viewer/sk_app/WindowContext.cpp | 4 | ||||
-rw-r--r-- | tools/viewer/sk_app/android/GLWindowContext_android.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp index 4802e214b4..898710f109 100644 --- a/tools/viewer/sk_app/VulkanWindowContext.cpp +++ b/tools/viewer/sk_app/VulkanWindowContext.cpp @@ -171,7 +171,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height, // Pick our surface format. For now, just make sure it matches our sRGB request: VkFormat surfaceFormat = VK_FORMAT_UNDEFINED; VkColorSpaceKHR colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; - auto srgbColorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); + auto srgbColorSpace = SkColorSpace::MakeSRGB(); bool wantSRGB = srgbColorSpace == params.fColorSpace; for (uint32_t i = 0; i < surfaceFormatCount; ++i) { GrPixelConfig config; diff --git a/tools/viewer/sk_app/WindowContext.cpp b/tools/viewer/sk_app/WindowContext.cpp index 3da8dd1532..8efe9bd24a 100644 --- a/tools/viewer/sk_app/WindowContext.cpp +++ b/tools/viewer/sk_app/WindowContext.cpp @@ -43,7 +43,7 @@ sk_sp<SkSurface> WindowContext::createSurface( fWidth, fHeight, fDisplayParams.fColorType, kPremul_SkAlphaType, - forceSRGB ? SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named) + forceSRGB ? SkColorSpace::MakeSRGB() : fDisplayParams.fColorSpace ); if (this->isGpuContext()) { @@ -54,7 +54,7 @@ sk_sp<SkSurface> WindowContext::createSurface( } } else { sk_sp<SkColorSpace> colorSpace = GrPixelConfigIsSRGB(rtDesc->fConfig) - ? SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named) : nullptr; + ? SkColorSpace::MakeSRGB() : nullptr; return SkSurface::MakeFromBackendRenderTarget(fContext, *rtDesc, colorSpace, &fSurfaceProps); } diff --git a/tools/viewer/sk_app/android/GLWindowContext_android.cpp b/tools/viewer/sk_app/android/GLWindowContext_android.cpp index 9f683968c6..20a76314fd 100644 --- a/tools/viewer/sk_app/android/GLWindowContext_android.cpp +++ b/tools/viewer/sk_app/android/GLWindowContext_android.cpp @@ -102,7 +102,7 @@ void GLWindowContext_android::onInitializeContext() { EGL_NONE, }; const EGLint* windowAttribs = nullptr; - auto srgbColorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); + auto srgbColorSpace = SkColorSpace::MakeSRGB(); if (srgbColorSpace == fDisplayParams.fColorSpace && majorVersion == 1 && minorVersion >= 2) { windowAttribs = srgbWindowAttribs; } |