Commit a86e050f authored by jbroman@chromium.org's avatar jbroman@chromium.org

Use ARRAYSIZE_UNSAFE to find the number of painters in shader_bench.

Previously, a separate constant (kNumPainters) was used.
This constant was incorrect (there were only two elements in the array).

As described in http://www.viva64.com/en/b/0205/.

BUG=271533

Review URL: https://chromiumcodereview.appspot.com/22920003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217124 0039d316-1c4b-4281-b951-d872f2087c98
parent c313fa9a
......@@ -138,7 +138,6 @@ int main(int argc, char** argv) {
context->SetSwapInterval(0);
// Initialize and name GPU painters.
static const int kNumPainters = 3;
static const struct {
const char* name;
GPUPainter* painter;
......@@ -148,7 +147,7 @@ int main(int argc, char** argv) {
};
// Run GPU painter tests.
for (int i = 0; i < kNumPainters; i++) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(painters); i++) {
scoped_ptr<GPUPainter> painter(painters[i].painter);
painter->LoadFrames(&frames);
painter->SetGLContext(surface, context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment