OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3086 struct Cmds { | 3086 struct Cmds { |
3087 cmds::DiscardBackbufferCHROMIUM cmd; | 3087 cmds::DiscardBackbufferCHROMIUM cmd; |
3088 }; | 3088 }; |
3089 Cmds expected; | 3089 Cmds expected; |
3090 expected.cmd.Init(); | 3090 expected.cmd.Init(); |
3091 | 3091 |
3092 gl_->DiscardBackbufferCHROMIUM(); | 3092 gl_->DiscardBackbufferCHROMIUM(); |
3093 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3093 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3094 } | 3094 } |
3095 | 3095 |
| 3096 TEST_F(GLES2ImplementationTest, FlushDriverCachesCHROMIUM) { |
| 3097 struct Cmds { |
| 3098 cmds::FlushDriverCachesCHROMIUM cmd; |
| 3099 }; |
| 3100 Cmds expected; |
| 3101 expected.cmd.Init(); |
| 3102 |
| 3103 gl_->FlushDriverCachesCHROMIUM(); |
| 3104 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 3105 } |
| 3106 |
3096 TEST_F(GLES2ImplementationTest, MatrixLoadfCHROMIUM) { | 3107 TEST_F(GLES2ImplementationTest, MatrixLoadfCHROMIUM) { |
3097 GLfloat data[16] = {0}; | 3108 GLfloat data[16] = {0}; |
3098 struct Cmds { | 3109 struct Cmds { |
3099 cmds::MatrixLoadfCHROMIUMImmediate cmd; | 3110 cmds::MatrixLoadfCHROMIUMImmediate cmd; |
3100 GLfloat data[16]; | 3111 GLfloat data[16]; |
3101 }; | 3112 }; |
3102 | 3113 |
3103 for (int jj = 0; jj < 16; ++jj) { | 3114 for (int jj = 0; jj < 16; ++jj) { |
3104 data[jj] = static_cast<GLfloat>(jj); | 3115 data[jj] = static_cast<GLfloat>(jj); |
3105 } | 3116 } |
3106 Cmds expected; | 3117 Cmds expected; |
3107 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM, &data[0]); | 3118 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM, &data[0]); |
3108 gl_->MatrixLoadfCHROMIUM(GL_PATH_PROJECTION_CHROMIUM, &data[0]); | 3119 gl_->MatrixLoadfCHROMIUM(GL_PATH_PROJECTION_CHROMIUM, &data[0]); |
3109 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3120 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3110 } | 3121 } |
3111 | 3122 |
3112 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { | 3123 TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) { |
3113 struct Cmds { | 3124 struct Cmds { |
3114 cmds::MatrixLoadIdentityCHROMIUM cmd; | 3125 cmds::MatrixLoadIdentityCHROMIUM cmd; |
3115 }; | 3126 }; |
3116 Cmds expected; | 3127 Cmds expected; |
3117 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); | 3128 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); |
3118 | 3129 |
3119 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); | 3130 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); |
3120 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3131 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3121 } | 3132 } |
3122 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3133 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |