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

Side by Side Diff: client/deps/glbench/src/windowmanagercompositingtest.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/varyingsandddxytest.cc ('k') | client/deps/glbench/src/yuvtest.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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "main.h" 7 #include "main.h"
8 #include "testbase.h" 8 #include "testbase.h"
9 #include "utils.h" 9 #include "utils.h"
10 10
11 11
12 namespace glbench { 12 namespace glbench {
13 13
14 const float kScreenScaleFactor = 1e6f * (WINDOW_WIDTH * WINDOW_HEIGHT) / 14 const float kScreenScaleFactor = 1e6f * (WINDOW_WIDTH * WINDOW_HEIGHT) /
15 (1280.f * 768); 15 (1280.f * 768);
16 16
17 class WindowManagerCompositingTest : public TestBase { 17 class WindowManagerCompositingTest : public TestBase {
18 public: 18 public:
19 WindowManagerCompositingTest(bool scissor) 19 WindowManagerCompositingTest(bool scissor)
20 : scissor_(scissor), 20 : scissor_(scissor),
21 compositing_background_program_(0), 21 compositing_background_program_(0),
22 compositing_foreground_program_(0) {} 22 compositing_foreground_program_(0) {}
23 virtual ~WindowManagerCompositingTest() {} 23 virtual ~WindowManagerCompositingTest() {}
24 virtual bool TestFunc(int iter); 24 virtual bool TestFunc(int iter);
25 virtual bool Run(); 25 virtual bool Run();
26 virtual const char* Name() const { return "compositing"; }
26 27
27 void InitializeCompositing(); 28 void InitializeCompositing();
28 void TeardownCompositing(); 29 void TeardownCompositing();
29 void InitBaseTexture(); 30 void InitBaseTexture();
30 void UpdateTexture(); 31 void UpdateTexture();
31 void LoadTexture(); 32 void LoadTexture();
32 33
33 private: 34 private:
34 bool scissor_; 35 bool scissor_;
35 uint32_t texture_base_[WINDOW_HEIGHT*WINDOW_WIDTH]; 36 uint32_t texture_base_[WINDOW_HEIGHT*WINDOW_WIDTH];
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 410 }
410 411
411 void WindowManagerCompositingTest::LoadTexture() { 412 void WindowManagerCompositingTest::LoadTexture() {
412 // Use GL_RGBA for compatibility with GLES2.0. 413 // Use GL_RGBA for compatibility with GLES2.0.
413 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 414 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
414 WINDOW_WIDTH, WINDOW_HEIGHT, 0, 415 WINDOW_WIDTH, WINDOW_HEIGHT, 0,
415 GL_RGBA, GL_UNSIGNED_BYTE, texture_update_); 416 GL_RGBA, GL_UNSIGNED_BYTE, texture_update_);
416 } 417 }
417 418
418 } // namespace glbench 419 } // namespace glbench
OLDNEW
« no previous file with comments | « client/deps/glbench/src/varyingsandddxytest.cc ('k') | client/deps/glbench/src/yuvtest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698