aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpace.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-01-26 13:58:24 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-26 19:52:20 +0000
commit333848272c4d023199e44ff38f2e6fc6876388e8 (patch)
tree399fd71be826ba4c0a276909fe0e539dd765f435 /src/core/SkColorSpace.cpp
parent8f11d4dcafef4447fa68ea0ab28a72589241e9fd (diff)
remove SkColorSpace_Base
The type SkColorSpace_Base doesn't need to exist. Its one type() query can be answered instead by toXYZD50(). Now all that's left in the file is SkGammas, so rename it to SkGammas.h. Change-Id: Id60ddbfb342accfd5674ae89b37a24a6583ef7b8 Reviewed-on: https://skia-review.googlesource.com/99702 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkColorSpace.cpp')
-rw-r--r--src/core/SkColorSpace.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp
index 6dc9be6a8f..1092653a57 100644
--- a/src/core/SkColorSpace.cpp
+++ b/src/core/SkColorSpace.cpp
@@ -6,7 +6,6 @@
*/
#include "SkColorSpace.h"
-#include "SkColorSpace_Base.h"
#include "SkColorSpace_XYZ.h"
#include "SkColorSpacePriv.h"
#include "SkPoint3.h"
@@ -336,8 +335,8 @@ size_t SkColorSpace::writeToMemory(void* memory) const {
// Start by trying the serialization fast path. If we haven't saved ICC profile data,
// we must have a profile that we can serialize easily.
if (!this->onProfileData()) {
- // Profile data is mandatory for A2B0 color spaces.
- SkASSERT(SkColorSpace_Base::Type::kA2B != as_CSB(this)->type());
+ // Profile data is mandatory for A2B0 color spaces, so we must be XYZ.
+ SkASSERT(this->toXYZD50());
// If we have a named profile, only write the enum.
const SkGammaNamed gammaNamed = this->gammaNamed();
if (this == srgb()) {