Chromium Code Reviews| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 | 360 |
| 361 // Create a web platform without V8. | 361 // Create a web platform without V8. |
| 362 | 362 |
| 363 class WebPlatform : public blink::Platform { | 363 class WebPlatform : public blink::Platform { |
| 364 public: | 364 public: |
| 365 const unsigned char* getTraceCategoryEnabledFlag(const char*) override | 365 const unsigned char* getTraceCategoryEnabledFlag(const char*) override |
| 366 { | 366 { |
| 367 return reinterpret_cast<const unsigned char *>("nope-none-nada"); | 367 return reinterpret_cast<const unsigned char *>("nope-none-nada"); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void cryptographicallyRandomValues(unsigned char*, size_t) override | 370 void cryptographicallyRandomValues(unsigned char*, size_t) override |
|
jww
2015/11/10 18:43:16
There was a comment in one of the other classes ex
eroman
2015/11/10 19:26:14
The existing comment here was wrong here which is
| |
| 371 { | 371 { |
| 372 // Do nothing: make blink::Platform use the default crypto-randoms. | 372 ASSERT_NOT_REACHED(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 void screenColorProfile(WebVector<char>* profile) override | 375 void screenColorProfile(WebVector<char>* profile) override |
| 376 { | 376 { |
| 377 getScreenColorProfile(profile); // Returns a whacked color profile. | 377 getScreenColorProfile(profile); // Returns a whacked color profile. |
| 378 } | 378 } |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 blink::initializeWithoutV8(new WebPlatform()); | 381 blink::initializeWithoutV8(new WebPlatform()); |
| 382 | 382 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 411 exit(3); | 411 exit(3); |
| 412 } | 412 } |
| 413 } | 413 } |
| 414 | 414 |
| 415 // Results to stdout. | 415 // Results to stdout. |
| 416 | 416 |
| 417 double averageTime = totalTime / static_cast<double>(iterations); | 417 double averageTime = totalTime / static_cast<double>(iterations); |
| 418 printf("%f %f\n", totalTime, averageTime); | 418 printf("%f %f\n", totalTime, averageTime); |
| 419 return 0; | 419 return 0; |
| 420 } | 420 } |
| OLD | NEW |