aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/viewer')
-rw-r--r--tools/viewer/ImageSlide.cpp4
-rw-r--r--tools/viewer/Viewer.cpp2
-rw-r--r--tools/viewer/sk_app/VulkanWindowContext.cpp2
-rw-r--r--tools/viewer/sk_app/WindowContext.cpp4
-rw-r--r--tools/viewer/sk_app/android/GLWindowContext_android.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/tools/viewer/ImageSlide.cpp b/tools/viewer/ImageSlide.cpp
index 0ffd4ea080..0b52a81ddc 100644
--- a/tools/viewer/ImageSlide.cpp
+++ b/tools/viewer/ImageSlide.cpp
@@ -10,7 +10,7 @@
#include "SkBitmap.h"
#include "SkCodec.h"
#include "SkColorSpaceXform.h"
-#include "SkColorSpace.h"
+#include "SkColorSpace_Base.h"
#include "SkCanvas.h"
#include "SkData.h"
#include "SkImage.h"
@@ -46,7 +46,7 @@ void ImageSlide::load(SkScalar, SkScalar) {
codec->getPixels(codec->getInfo(), fOriginalBitmap.getPixels(), fOriginalBitmap.rowBytes());
SkImageInfo xformedInfo = codec->getInfo().makeColorSpace(
- SkColorSpace::MakeNamed(SkColorSpace::kAdobeRGB_Named));
+ SkColorSpace_Base::MakeNamed(SkColorSpace_Base::kAdobeRGB_Named));
fXformedBitmap.allocPixels(xformedInfo);
codec->getPixels(xformedInfo, fXformedBitmap.getPixels(), fXformedBitmap.rowBytes());
}
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 49a331bcf4..0b93afc2b1 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -165,7 +165,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
fCommands.addCommand('c', "Modes", "Toggle sRGB color mode", [this]() {
DisplayParams params = fWindow->getDisplayParams();
params.fColorSpace = (nullptr == params.fColorSpace)
- ? SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named) : nullptr;
+ ? SkColorSpace::MakeSRGB() : nullptr;
fWindow->setDisplayParams(params);
this->updateTitle();
fWindow->inval();
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;
}