| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkColorSpace_DEFINED | 8 #ifndef SkColorSpace_DEFINED |
| 9 #define SkColorSpace_DEFINED | 9 #define SkColorSpace_DEFINED |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 sk_sp<SkData> serialize() const; | 97 sk_sp<SkData> serialize() const; |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * If |memory| is nullptr, returns the size required to serialize. | 100 * If |memory| is nullptr, returns the size required to serialize. |
| 101 * Otherwise, serializes into |memory| and returns the size. | 101 * Otherwise, serializes into |memory| and returns the size. |
| 102 */ | 102 */ |
| 103 size_t writeToMemory(void* memory) const; | 103 size_t writeToMemory(void* memory) const; |
| 104 | 104 |
| 105 static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length); | 105 static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length); |
| 106 | 106 |
| 107 /** |
| 108 * If both are null, we return true. If one is null and the other is not,
we return false. |
| 109 * If both are non-null, we do a deeper compare. |
| 110 */ |
| 111 static bool Equals(const SkColorSpace* src, const SkColorSpace* dst); |
| 112 |
| 107 protected: | 113 protected: |
| 108 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named)
; | 114 SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named)
; |
| 109 | 115 |
| 110 const GammaNamed fGammaNamed; | 116 const GammaNamed fGammaNamed; |
| 111 const SkMatrix44 fToXYZD50; | 117 const SkMatrix44 fToXYZD50; |
| 112 const Named fNamed; | 118 const Named fNamed; |
| 113 }; | 119 }; |
| 114 | 120 |
| 115 #endif | 121 #endif |
| OLD | NEW |