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

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

Issue 2217463003: Color profile layout test cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « third_party/WebKit/LayoutTests/media/color-profile-video-seek-object-fit.html ('k') | 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 // 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 exit(1); 349 exit(1);
350 } 350 }
351 } 351 }
352 352
353 // Create a web platform without V8. 353 // Create a web platform without V8.
354 354
355 class WebPlatform : public blink::Platform { 355 class WebPlatform : public blink::Platform {
356 public: 356 public:
357 void screenColorProfile(WebVector<char>* profile) override 357 void screenColorProfile(WebVector<char>* profile) override
358 { 358 {
359 getScreenColorProfile(profile); // Returns a whacked color profile. 359 getScreenColorProfile(profile); // Returns a color spin color profil e.
360 } 360 }
361 }; 361 };
362 362
363 Platform::initialize(new WebPlatform()); 363 Platform::initialize(new WebPlatform());
364 364
365 // Read entire file content to data, and consolidate the SharedBuffer data 365 // Read entire file content to data, and consolidate the SharedBuffer data
366 // segments into one, contiguous block of memory. 366 // segments into one, contiguous block of memory.
367 367
368 RefPtr<SharedBuffer> data = readFile(argv[1]); 368 RefPtr<SharedBuffer> data = readFile(argv[1]);
369 if (!data.get() || !data->size()) { 369 if (!data.get() || !data->size()) {
(...skipping 24 matching lines...) Expand all
394 exit(3); 394 exit(3);
395 } 395 }
396 } 396 }
397 397
398 // Results to stdout. 398 // Results to stdout.
399 399
400 double averageTime = totalTime / static_cast<double>(iterations); 400 double averageTime = totalTime / static_cast<double>(iterations);
401 printf("%f %f\n", totalTime, averageTime); 401 printf("%f %f\n", totalTime, averageTime);
402 return 0; 402 return 0;
403 } 403 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/color-profile-video-seek-object-fit.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698