Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: bench/ColorCodecBench.cpp

Issue 2194903002: Fix various SkColorSpace bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use switch statement in nonstandard struct Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698