| OLD | NEW |
| 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 #ifdef WTF | 5 #ifdef WTF |
| 6 | 6 |
| 7 Provides a minimal wrapping of the Blink image decoders. Used to perform | 7 Provides a minimal wrapping of the Blink image decoders. Used to perform |
| 8 a non-threaded, memory-to-memory image decode using micro second accuracy | 8 a non-threaded, memory-to-memory image decode using micro second accuracy |
| 9 clocks to measure image decode time. Optionally applies color correction | 9 clocks to measure image decode time. Optionally applies color correction |
| 10 during image decoding on supported platforms (default off). Usage: | 10 during image decoding on supported platforms (default off). Usage: |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const unsigned char* getTraceCategoryEnabledFlag(const char*) override | 331 const unsigned char* getTraceCategoryEnabledFlag(const char*) override |
| 332 { | 332 { |
| 333 return reinterpret_cast<const unsigned char *>("nope-none-nada"); | 333 return reinterpret_cast<const unsigned char *>("nope-none-nada"); |
| 334 } | 334 } |
| 335 | 335 |
| 336 void cryptographicallyRandomValues(unsigned char*, size_t) override | 336 void cryptographicallyRandomValues(unsigned char*, size_t) override |
| 337 { | 337 { |
| 338 // Do nothing: make blink::Platform use the default crypto-randoms. | 338 // Do nothing: make blink::Platform use the default crypto-randoms. |
| 339 } | 339 } |
| 340 | 340 |
| 341 virtual void screenColorProfile(WebVector<char>* profile) override | 341 void screenColorProfile(WebVector<char>* profile) override |
| 342 { | 342 { |
| 343 getScreenColorProfile(profile); // Returns a whacked color profile. | 343 getScreenColorProfile(profile); // Returns a whacked color profile. |
| 344 } | 344 } |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 blink::initializeWithoutV8(new WebPlatform()); | 347 blink::initializeWithoutV8(new WebPlatform()); |
| 348 | 348 |
| 349 // Set image decoding Platform options. | 349 // Set image decoding Platform options. |
| 350 | 350 |
| 351 #if USE(QCMSLIB) | 351 #if USE(QCMSLIB) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 374 exit(3); | 374 exit(3); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 // Results to stdout. | 378 // Results to stdout. |
| 379 | 379 |
| 380 double averageTime = totalTime / static_cast<double>(iterations); | 380 double averageTime = totalTime / static_cast<double>(iterations); |
| 381 printf("%f %f\n", totalTime, averageTime); | 381 printf("%f %f\n", totalTime, averageTime); |
| 382 return 0; | 382 return 0; |
| 383 } | 383 } |
| OLD | NEW |