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

Side by Side Diff: third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp

Issue 2641973002: Use gfx::ICCProfile type consistently (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Provides a minimal wrapping of the Blink image decoders. Used to perform 5 // Provides a minimal wrapping of the Blink image decoders. Used to perform
6 // a non-threaded, memory-to-memory image decode using micro second accuracy 6 // a non-threaded, memory-to-memory image decode using micro second accuracy
7 // clocks to measure image decode time. Optionally applies color correction 7 // clocks to measure image decode time. Optionally applies color correction
8 // during image decoding on supported platforms (default off). Usage: 8 // during image decoding on supported platforms (default off). Usage:
9 // 9 //
10 // % ninja -C out/Release image_decode_bench && 10 // % ninja -C out/Release image_decode_bench &&
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 int main(int argc, char* argv[]) { 249 int main(int argc, char* argv[]) {
250 base::CommandLine::Init(argc, argv); 250 base::CommandLine::Init(argc, argv);
251 251
252 // If the platform supports color correction, allow it to be controlled. 252 // If the platform supports color correction, allow it to be controlled.
253 253
254 bool applyColorCorrection = false; 254 bool applyColorCorrection = false;
255 255
256 if (argc >= 2 && strcmp(argv[1], "--color-correct") == 0) { 256 if (argc >= 2 && strcmp(argv[1], "--color-correct") == 0) {
257 applyColorCorrection = (--argc, ++argv, true); 257 applyColorCorrection = (--argc, ++argv, true);
258 gfx::ICCProfile profile = gfx::ICCProfileForTestingColorSpin(); 258 gfx::ICCProfile profile = gfx::ICCProfileForTestingColorSpin();
259 ColorBehavior::setGlobalTargetColorProfile(profile.GetData()); 259 ColorBehavior::setGlobalTargetColorProfile(profile);
260 } 260 }
261 261
262 if (argc < 2) { 262 if (argc < 2) {
263 fprintf(stderr, 263 fprintf(stderr,
264 "Usage: %s [--color-correct] file [iterations] [packetSize]\n", 264 "Usage: %s [--color-correct] file [iterations] [packetSize]\n",
265 argv[0]); 265 argv[0]);
266 exit(1); 266 exit(1);
267 } 267 }
268 268
269 // Control decode bench iterations and packet size. 269 // Control decode bench iterations and packet size.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 exit(3); 335 exit(3);
336 } 336 }
337 } 337 }
338 338
339 // Results to stdout. 339 // Results to stdout.
340 340
341 double averageTime = totalTime / static_cast<double>(iterations); 341 double averageTime = totalTime / static_cast<double>(iterations);
342 printf("%f %f\n", totalTime, averageTime); 342 printf("%f %f\n", totalTime, averageTime);
343 return 0; 343 return 0;
344 } 344 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698