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

Side by Side Diff: cc/raster/texture_compressor_perftest.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 | « cc/raster/texture_compressor_etc1_unittest.cc ('k') | cc/raster/tile_task_runner.h » ('j') | 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/debug/lap_timer.h" 8 #include "cc/debug/lap_timer.h"
9 #include "cc/raster/texture_compressor.h" 9 #include "cc/raster/texture_compressor.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } while (!timer_.HasTimeLimitExpired()); 70 } while (!timer_.HasTimeLimitExpired());
71 71
72 TextureCompressor::Format format = ::testing::get<1>(GetParam()); 72 TextureCompressor::Format format = ::testing::get<1>(GetParam());
73 std::string str = FormatName(format) + " " + QualityName(quality); 73 std::string str = FormatName(format) + " " + QualityName(quality);
74 perf_test::PrintResult("Compress256x256", name, str, timer_.MsPerLap(), 74 perf_test::PrintResult("Compress256x256", name, str, timer_.MsPerLap(),
75 "us", true); 75 "us", true);
76 } 76 }
77 77
78 protected: 78 protected:
79 LapTimer timer_; 79 LapTimer timer_;
80 scoped_ptr<TextureCompressor> compressor_; 80 std::unique_ptr<TextureCompressor> compressor_;
81 uint8_t src_[kImageSizeInBytes]; 81 uint8_t src_[kImageSizeInBytes];
82 uint8_t dst_[kImageSizeInBytes]; 82 uint8_t dst_[kImageSizeInBytes];
83 }; 83 };
84 84
85 TEST_P(TextureCompressorPerfTest, Compress256x256BlackAndWhiteGradientImage) { 85 TEST_P(TextureCompressorPerfTest, Compress256x256BlackAndWhiteGradientImage) {
86 for (int i = 0; i < kImageSizeInBytes; ++i) 86 for (int i = 0; i < kImageSizeInBytes; ++i)
87 src_[i] = i % 256; 87 src_[i] = i % 256;
88 88
89 RunTest("BlackAndWhiteGradientImage"); 89 RunTest("BlackAndWhiteGradientImage");
90 } 90 }
(...skipping 23 matching lines...) Expand all
114 INSTANTIATE_TEST_CASE_P( 114 INSTANTIATE_TEST_CASE_P(
115 TextureCompressorPerfTests, 115 TextureCompressorPerfTests,
116 TextureCompressorPerfTest, 116 TextureCompressorPerfTest,
117 ::testing::Combine(::testing::Values(TextureCompressor::kQualityLow, 117 ::testing::Combine(::testing::Values(TextureCompressor::kQualityLow,
118 TextureCompressor::kQualityMedium, 118 TextureCompressor::kQualityMedium,
119 TextureCompressor::kQualityHigh), 119 TextureCompressor::kQualityHigh),
120 ::testing::Values(TextureCompressor::kFormatETC1))); 120 ::testing::Values(TextureCompressor::kFormatETC1)));
121 121
122 } // namespace 122 } // namespace
123 } // namespace cc 123 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/texture_compressor_etc1_unittest.cc ('k') | cc/raster/tile_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698