Chromium Code Reviews| Index: cc/resources/texture_compressor_perftest.cc | 
| diff --git a/cc/resources/texture_compressor_perftest.cc b/cc/resources/texture_compressor_perftest.cc | 
| index 7d68bd6f5f3d9415e2d14de53de87fd4f860935f..f87fdb89d9054eeaf1f6cbb645527ef0b84e556f 100644 | 
| --- a/cc/resources/texture_compressor_perftest.cc | 
| +++ b/cc/resources/texture_compressor_perftest.cc | 
| @@ -17,7 +17,8 @@ const int kTimeCheckInterval = 10; | 
| const int kImageWidth = 256; | 
| const int kImageHeight = 256; | 
| -const int kImageSizeInBytes = kImageWidth * kImageHeight * 4; | 
| +const int kImageChannels = 4; | 
| +const int kImageSizeInBytes = kImageWidth * kImageHeight * kImageChannels; | 
| const TextureCompressor::Quality kQualities[] = { | 
| TextureCompressor::kQualityLow, | 
| @@ -80,19 +81,36 @@ class TextureCompressorPerfTest | 
| uint8_t dst_[kImageSizeInBytes]; | 
| }; | 
| -TEST_P(TextureCompressorPerfTest, Compress256x256Image) { | 
| +TEST_P(TextureCompressorPerfTest, Compress256x256BlackAndWhiteGradientImage) { | 
| for (int i = 0; i < kImageSizeInBytes; ++i) | 
| src_[i] = i % 256; | 
| for (auto& quality : kQualities) | 
| 
 
reveman
2015/05/06 18:44:03
While touching this file, do you mind removing all
 
radu.velea
2015/05/07 11:21:41
Done.
 
 | 
| - RunTest("Image", quality); | 
| + RunTest("BlackAndWhiteGradientImage", quality); | 
| } | 
| -TEST_P(TextureCompressorPerfTest, Compress256x256SolidImage) { | 
| +TEST_P(TextureCompressorPerfTest, Compress256x256SolidBlackImage) { | 
| memset(src_, 0, kImageSizeInBytes); | 
| for (auto& quality : kQualities) | 
| - RunTest("SolidImage", quality); | 
| + RunTest("SolidBlackImage", quality); | 
| +} | 
| + | 
| +TEST_P(TextureCompressorPerfTest, Compress256x256SolidColorImage) { | 
| + for (int i = 0; i < kImageSizeInBytes; ++i) | 
| + src_[i] = (4 - i % 4) * 50; | 
| + | 
| + for (auto& quality : kQualities) | 
| + RunTest("SolidColorImage", quality); | 
| +} | 
| + | 
| +TEST_P(TextureCompressorPerfTest, Compress256x256RandomColorImage) { | 
| + unsigned int kImageSeed = 1234567890; | 
| + for (int i = 0; i < kImageSizeInBytes; ++i) | 
| + src_[i] = rand_r(&kImageSeed) % 256; | 
| + | 
| + for (auto& quality : kQualities) | 
| + RunTest("RandomColorImage", quality); | 
| } | 
| INSTANTIATE_TEST_CASE_P(TextureCompressorPerfTests, |