diff options
author | Brian Osman <brianosman@google.com> | 2016-10-24 09:24:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-24 14:02:27 +0000 |
commit | 526972ecb5411b84ba2f5e20252f178f9ee2151f (patch) | |
tree | ef89b6a40fcdf90ae8e0b00b8f7d247510e03656 /tools/viewer/sk_app | |
parent | 09732a6b0e7c4b087279095762f9d27a4f556aba (diff) |
Rename all color space factories from New* to Make*
Matches our naming convention for all other types - factories that
return sk_sp (or any type that intelligently manages its own
lifetime) are named Make.
Previous factories are still around, assuming
SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that
define for Android, etc.
See also: https://codereview.chromium.org/2442053002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3822
Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d
Reviewed-on: https://skia-review.googlesource.com/3822
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'tools/viewer/sk_app')
-rw-r--r-- | tools/viewer/sk_app/VulkanWindowContext.cpp | 2 | ||||
-rwxr-xr-x | tools/viewer/sk_app/WindowContext.cpp | 2 | ||||
-rw-r--r-- | tools/viewer/sk_app/android/GLWindowContext_android.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp index dc93623ade..8ce54f0b56 100644 --- a/tools/viewer/sk_app/VulkanWindowContext.cpp +++ b/tools/viewer/sk_app/VulkanWindowContext.cpp @@ -170,7 +170,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::NewNamed(SkColorSpace::kSRGB_Named); + auto srgbColorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); 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 b5039a3970..e8658806e3 100755 --- a/tools/viewer/sk_app/WindowContext.cpp +++ b/tools/viewer/sk_app/WindowContext.cpp @@ -42,7 +42,7 @@ sk_sp<SkSurface> WindowContext::createSurface( fWidth, fHeight, fDisplayParams.fColorType, kPremul_SkAlphaType, - forceSRGB ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) + forceSRGB ? SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named) : fDisplayParams.fColorSpace ); if (this->isGpuContext()) { diff --git a/tools/viewer/sk_app/android/GLWindowContext_android.cpp b/tools/viewer/sk_app/android/GLWindowContext_android.cpp index 3348d803e0..9f683968c6 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::NewNamed(SkColorSpace::kSRGB_Named); + auto srgbColorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named); if (srgbColorSpace == fDisplayParams.fColorSpace && majorVersion == 1 && minorVersion >= 2) { windowAttribs = srgbWindowAttribs; } |