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 #include "ColorCodecBench.h" | 8 #include "ColorCodecBench.h" |
9 #include "Resources.h" | 9 #include "Resources.h" |
10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 dst = SkTAddOffset<void>(dst, fDstInfo.minRowBytes()); | 133 dst = SkTAddOffset<void>(dst, fDstInfo.minRowBytes()); |
134 src = SkTAddOffset<void>(src, fSrcInfo.minRowBytes()); | 134 src = SkTAddOffset<void>(src, fSrcInfo.minRowBytes()); |
135 } | 135 } |
136 } | 136 } |
137 #endif | 137 #endif |
138 | 138 |
139 void ColorCodecBench::onDelayedSetup() { | 139 void ColorCodecBench::onDelayedSetup() { |
140 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fEncoded.get())); | 140 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(fEncoded.get())); |
141 fSrcData = codec->getICCData(); | 141 fSrcData = codec->getICCData(); |
142 sk_sp<SkData> dstData = SkData::MakeFromFileName( | 142 sk_sp<SkData> dstData = SkData::MakeFromFileName( |
143 GetResourcePath("monitor_profiles/HP_ZR30w.icc").c_str()); | 143 GetResourcePath("icc_profiles/HP_ZR30w.icc").c_str()); |
144 SkASSERT(dstData); | 144 SkASSERT(dstData); |
145 | 145 |
146 fDstSpace = nullptr; | 146 fDstSpace = nullptr; |
147 #if defined(SK_TEST_QCMS) | 147 #if defined(SK_TEST_QCMS) |
148 if (FLAGS_qcms) { | 148 if (FLAGS_qcms) { |
149 fDstSpaceQCMS.reset(FLAGS_srgb ? | 149 fDstSpaceQCMS.reset(FLAGS_srgb ? |
150 qcms_profile_sRGB() : | 150 qcms_profile_sRGB() : |
151 qcms_profile_from_memory(dstData->data(), dstData->size())); | 151 qcms_profile_from_memory(dstData->data(), dstData->size())); |
152 SkASSERT(fDstSpaceQCMS); | 152 SkASSERT(fDstSpaceQCMS); |
153 | 153 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 #endif | 205 #endif |
206 { | 206 { |
207 if (FLAGS_xform_only) { | 207 if (FLAGS_xform_only) { |
208 this->xformOnly(); | 208 this->xformOnly(); |
209 } else { | 209 } else { |
210 this->decodeAndXform(); | 210 this->decodeAndXform(); |
211 } | 211 } |
212 } | 212 } |
213 } | 213 } |
214 } | 214 } |
OLD | NEW |