| OLD | NEW |
| 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 "main.h" | 6 #include "main.h" |
| 7 #include "testbase.h" | 7 #include "testbase.h" |
| 8 #include "utils.h" | 8 #include "utils.h" |
| 9 | 9 |
| 10 namespace glbench { | 10 namespace glbench { |
| 11 | 11 |
| 12 | 12 |
| 13 class FillRateTest : public DrawArraysTestFunc { | 13 class FillRateTest : public DrawArraysTestFunc { |
| 14 public: | 14 public: |
| 15 FillRateTest() {} | 15 FillRateTest() {} |
| 16 virtual ~FillRateTest() {} | 16 virtual ~FillRateTest() {} |
| 17 virtual bool Run(); | 17 virtual bool Run(); |
| 18 virtual const char* Name() const { return "fill_rate"; } |
| 18 | 19 |
| 19 private: | 20 private: |
| 20 DISALLOW_COPY_AND_ASSIGN(FillRateTest); | 21 DISALLOW_COPY_AND_ASSIGN(FillRateTest); |
| 21 }; | 22 }; |
| 22 | 23 |
| 23 | 24 |
| 24 bool FillRateTest::Run() { | 25 bool FillRateTest::Run() { |
| 25 glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); | 26 glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); |
| 26 glDisable(GL_DEPTH_TEST); | 27 glDisable(GL_DEPTH_TEST); |
| 27 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 28 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 glDeleteTextures(1, &texture); | 97 glDeleteTextures(1, &texture); |
| 97 | 98 |
| 98 return true; | 99 return true; |
| 99 } | 100 } |
| 100 | 101 |
| 101 TestBase* GetFillRateTest() { | 102 TestBase* GetFillRateTest() { |
| 102 return new FillRateTest; | 103 return new FillRateTest; |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace glbench | 106 } // namespace glbench |
| OLD | NEW |