| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file looks like a unit test, but it contains benchmarks and test | 5 // This file looks like a unit test, but it contains benchmarks and test |
| 6 // utilities intended for manual evaluation of the scalers in | 6 // utilities intended for manual evaluation of the scalers in |
| 7 // gl_helper*. These tests produce output in the form of files and printouts, | 7 // gl_helper*. These tests produce output in the form of files and printouts, |
| 8 // but cannot really "fail". There is no point in making these tests part | 8 // but cannot really "fail". There is no point in making these tests part |
| 9 // of any test automation run. | 9 // of any test automation run. |
| 10 | 10 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 dst_texture, | 276 dst_texture, |
| 277 gfx::Rect(0, 0, | 277 gfx::Rect(0, 0, |
| 278 dst_size.width(), | 278 dst_size.width(), |
| 279 dst_size.height()), | 279 dst_size.height()), |
| 280 static_cast<unsigned char *>(output_pixels.getPixels()), | 280 static_cast<unsigned char *>(output_pixels.getPixels()), |
| 281 kN32_SkColorType); | 281 kN32_SkColorType); |
| 282 context_->deleteTexture(dst_texture); | 282 context_->deleteTexture(dst_texture); |
| 283 std::string filename = base::StringPrintf("testoutput_%s_%d.ppm", | 283 std::string filename = base::StringPrintf("testoutput_%s_%d.ppm", |
| 284 kQualityNames[q], | 284 kQualityNames[q], |
| 285 percents[p]); | 285 percents[p]); |
| 286 VLOG(0) << "Writing " << filename; | 286 DVLOG(0) << "Writing " << filename; |
| 287 SaveToFile(&output_pixels, base::FilePath::FromUTF8Unsafe(filename)); | 287 SaveToFile(&output_pixels, base::FilePath::FromUTF8Unsafe(filename)); |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 context_->deleteTexture(src_texture); | 290 context_->deleteTexture(src_texture); |
| 291 context_->deleteFramebuffer(framebuffer); | 291 context_->deleteFramebuffer(framebuffer); |
| 292 } | 292 } |
| 293 | 293 |
| 294 } // namespace | 294 } // namespace |
| 295 | 295 |
| 296 // These tests needs to run against a proper GL environment, so we | 296 // These tests needs to run against a proper GL environment, so we |
| 297 // need to set it up before we can run the tests. | 297 // need to set it up before we can run the tests. |
| 298 int main(int argc, char** argv) { | 298 int main(int argc, char** argv) { |
| 299 base::CommandLine::Init(argc, argv); | 299 base::CommandLine::Init(argc, argv); |
| 300 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); | 300 base::TestSuite* suite = new content::ContentTestSuite(argc, argv); |
| 301 #if defined(OS_MACOSX) | 301 #if defined(OS_MACOSX) |
| 302 base::mac::ScopedNSAutoreleasePool pool; | 302 base::mac::ScopedNSAutoreleasePool pool; |
| 303 #endif | 303 #endif |
| 304 gfx::GLSurface::InitializeOneOff(); | 304 gfx::GLSurface::InitializeOneOff(); |
| 305 | 305 |
| 306 return content::UnitTestTestSuite(suite).Run(); | 306 return content::UnitTestTestSuite(suite).Run(); |
| 307 } | 307 } |
| OLD | NEW |