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

Side by Side Diff: gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 7
8 #include "gpu/command_buffer/tests/gl_manager.h" 8 #include "gpu/command_buffer/tests/gl_manager.h"
9 #include "gpu/command_buffer/tests/gl_test_utils.h" 9 #include "gpu/command_buffer/tests/gl_test_utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 GLManager gl_real_; 43 GLManager gl_real_;
44 GLManager gl_real_shared_; 44 GLManager gl_real_shared_;
45 GLManager gl1_; 45 GLManager gl1_;
46 GLManager gl2_; 46 GLManager gl2_;
47 }; 47 };
48 48
49 namespace { 49 namespace {
50 50
51 #if !defined(OS_ANDROID)
51 void SetupSimpleShader(const uint8* color) { 52 void SetupSimpleShader(const uint8* color) {
52 static const char* v_shader_str = SHADER( 53 static const char* v_shader_str = SHADER(
53 attribute vec4 a_Position; 54 attribute vec4 a_Position;
54 void main() 55 void main()
55 { 56 {
56 gl_Position = a_Position; 57 gl_Position = a_Position;
57 } 58 }
58 ); 59 );
59 60
60 static const char* f_shader_str = SHADER( 61 static const char* f_shader_str = SHADER(
(...skipping 22 matching lines...) Expand all
83 } 84 }
84 85
85 void TestDraw(int size) { 86 void TestDraw(int size) {
86 uint8 expected_clear[] = { 127, 0, 255, 0, }; 87 uint8 expected_clear[] = { 127, 0, 255, 0, };
87 glClearColor(0.5f, 0.0f, 1.0f, 0.0f); 88 glClearColor(0.5f, 0.0f, 1.0f, 0.0f);
88 glClear(GL_COLOR_BUFFER_BIT); 89 glClear(GL_COLOR_BUFFER_BIT);
89 EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, size, size, 1, expected_clear)); 90 EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, size, size, 1, expected_clear));
90 glDrawArrays(GL_TRIANGLES, 0, 6); 91 glDrawArrays(GL_TRIANGLES, 0, 6);
91 } 92 }
92 93
94 #endif // !defined(OS_ANDROID)
95
93 } // anonymous namespace 96 } // anonymous namespace
94 97
95 // http://crbug.com/281565 98 // http://crbug.com/281565
96 #if !defined(OS_ANDROID) 99 #if !defined(OS_ANDROID)
97 TEST_F(GLVirtualContextsTest, Basic) { 100 TEST_F(GLVirtualContextsTest, Basic) {
98 struct TestInfo { 101 struct TestInfo {
99 int size; 102 int size;
100 uint8 color[4]; 103 uint8 color[4];
101 GLManager* manager; 104 GLManager* manager;
102 }; 105 };
(...skipping 30 matching lines...) Expand all
133 const TestInfo& test = tests[ii]; 136 const TestInfo& test = tests[ii];
134 GLManager* gl_manager = test.manager; 137 GLManager* gl_manager = test.manager;
135 gl_manager->MakeCurrent(); 138 gl_manager->MakeCurrent();
136 GLTestHelper::CheckGLError("no errors", __LINE__); 139 GLTestHelper::CheckGLError("no errors", __LINE__);
137 } 140 }
138 } 141 }
139 #endif 142 #endif
140 143
141 } // namespace gpu 144 } // namespace gpu
142 145
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | net/ssl/server_bound_cert_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698