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

Side by Side Diff: client/deps/glbench/src/readpixeltest.cc

Issue 2794002: Added gflags switches: duration, tests, save, out. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: addressed comments Created 10 years, 6 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 | « client/deps/glbench/src/main.cc ('k') | client/deps/glbench/src/swaptest.cc » ('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 (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
7 7
8 #include "main.h" 8 #include "main.h"
9 #include "testbase.h" 9 #include "testbase.h"
10 10
11 11
12 namespace glbench { 12 namespace glbench {
13 13
14 14
15 class ReadPixelTest : public TestBase { 15 class ReadPixelTest : public TestBase {
16 public: 16 public:
17 ReadPixelTest() : pixels_(NULL) {} 17 ReadPixelTest() : pixels_(NULL) {}
18 virtual ~ReadPixelTest() {} 18 virtual ~ReadPixelTest() {}
19 virtual bool TestFunc(int iter); 19 virtual bool TestFunc(int iter);
20 virtual bool Run(); 20 virtual bool Run();
21 virtual const char* Name() const { return "pixel_read"; }
21 22
22 private: 23 private:
23 void* pixels_; 24 void* pixels_;
24 DISALLOW_COPY_AND_ASSIGN(ReadPixelTest); 25 DISALLOW_COPY_AND_ASSIGN(ReadPixelTest);
25 }; 26 };
26 27
27 28
28 bool ReadPixelTest::TestFunc(int iter) { 29 bool ReadPixelTest::TestFunc(int iter) {
29 glReadPixels(0, 0, g_width, g_height, GL_RGBA, GL_UNSIGNED_BYTE, pixels_); 30 glReadPixels(0, 0, g_width, g_height, GL_RGBA, GL_UNSIGNED_BYTE, pixels_);
30 CHECK(glGetError() == 0); 31 CHECK(glGetError() == 0);
(...skipping 24 matching lines...) Expand all
55 return true; 56 return true;
56 } 57 }
57 58
58 59
59 TestBase* GetReadPixelTest() { 60 TestBase* GetReadPixelTest() {
60 return new ReadPixelTest; 61 return new ReadPixelTest;
61 } 62 }
62 63
63 64
64 } // namespace glbench 65 } // namespace glbench
OLDNEW
« no previous file with comments | « client/deps/glbench/src/main.cc ('k') | client/deps/glbench/src/swaptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698