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

Side by Side Diff: bench/ColorCodecBench.cpp

Issue 2159223003: Fix master-skia build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | no next file » | 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } else 192 } else
193 #endif 193 #endif
194 { 194 {
195 fDstSpace = FLAGS_srgb ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Name d) : 195 fDstSpace = FLAGS_srgb ? SkColorSpace::NewNamed(SkColorSpace::kSRGB_Name d) :
196 SkColorSpace::NewICC(dstData->data(), dstData-> size()); 196 SkColorSpace::NewICC(dstData->data(), dstData-> size());
197 SkASSERT(fDstSpace); 197 SkASSERT(fDstSpace);
198 } 198 }
199 } 199 }
200 200
201 void ColorCodecBench::onDraw(int n, SkCanvas*) { 201 void ColorCodecBench::onDraw(int n, SkCanvas*) {
202 if ((FLAGS_srgb || FLAGS_qcms) && FLAGS_half) { 202 #if defined(SK_TEST_QCMS)
203 bool to8888 = FLAGS_srgb || FLAGS_qcms;
204 #else
205 bool to8888 = FLAGS_srgb;
206 #endif
207 if (to8888 && FLAGS_half) {
203 SkDebugf("Error: Contradicting flags.\n"); 208 SkDebugf("Error: Contradicting flags.\n");
204 return; 209 return;
205 } 210 }
206 211
207 for (int i = 0; i < n; i++) { 212 for (int i = 0; i < n; i++) {
208 #if defined(SK_TEST_QCMS) 213 #if defined(SK_TEST_QCMS)
209 if (FLAGS_qcms) { 214 if (FLAGS_qcms) {
210 if (FLAGS_xform_only) { 215 if (FLAGS_xform_only) {
211 this->xformOnlyQCMS(); 216 this->xformOnlyQCMS();
212 } else { 217 } else {
213 this->decodeAndXformQCMS(); 218 this->decodeAndXformQCMS();
214 } 219 }
215 } else 220 } else
216 #endif 221 #endif
217 { 222 {
218 if (FLAGS_xform_only) { 223 if (FLAGS_xform_only) {
219 this->xformOnly(); 224 this->xformOnly();
220 } else { 225 } else {
221 this->decodeAndXform(); 226 this->decodeAndXform();
222 } 227 }
223 } 228 }
224 } 229 }
225 } 230 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698