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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // TODO(gman): LoseContextCHROMIUM 61 // TODO(gman): LoseContextCHROMIUM
62 62
63 // TODO(gman): InsertSyncPointCHROMIUM 63 // TODO(gman): InsertSyncPointCHROMIUM
64 64
65 // TODO(gman): WaitSyncPointCHROMIUM 65 // TODO(gman): WaitSyncPointCHROMIUM
66 66
67 // TODO(gman): DrawBuffersEXT 67 // TODO(gman): DrawBuffersEXT
68 // TODO(gman): DrawBuffersEXTImmediate 68 // TODO(gman): DrawBuffersEXTImmediate
69 // TODO(gman): DiscardBackbufferCHROMIUM 69 // TODO(gman): DiscardBackbufferCHROMIUM
70 70
71 TEST_F(GLES2DecoderTest3, MatrixModeValidArgs) {
72 EXPECT_CALL(*gl_, MatrixMode(GL_PROJECTION));
73 SpecializedSetup<cmds::MatrixMode, 0>(true);
74 cmds::MatrixMode cmd;
75 cmd.Init(GL_PROJECTION);
76 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
77 EXPECT_EQ(GL_NO_ERROR, GetGLError());
78 }
79
80 TEST_F(GLES2DecoderTest3, LoadMatrixfValidArgs) {
81 SpecializedSetup<cmds::LoadMatrixf, 0>(true);
82 cmds::LoadMatrixf cmd;
83 cmd.Init(shared_memory_id_, shared_memory_offset_);
84 GetSharedMemoryAs<GLfloat*>()[0] = 0;
85 EXPECT_CALL(
86 *gl_,
87 LoadMatrixf(reinterpret_cast<const GLfloat*>(shared_memory_address_)));
88 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
89 EXPECT_EQ(GL_NO_ERROR, GetGLError());
90 }
91
92 TEST_F(GLES2DecoderTest3, LoadMatrixfInvalidArgs0_0) {
93 EXPECT_CALL(*gl_, LoadMatrixf(_)).Times(0);
94 SpecializedSetup<cmds::LoadMatrixf, 0>(false);
95 cmds::LoadMatrixf cmd;
96 cmd.Init(kInvalidSharedMemoryId, 0);
97 GetSharedMemoryAs<GLfloat*>()[0] = 0;
98 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
99 }
100
101 TEST_F(GLES2DecoderTest3, LoadMatrixfInvalidArgs0_1) {
102 EXPECT_CALL(*gl_, LoadMatrixf(_)).Times(0);
103 SpecializedSetup<cmds::LoadMatrixf, 0>(false);
104 cmds::LoadMatrixf cmd;
105 cmd.Init(shared_memory_id_, kInvalidSharedMemoryOffset);
106 GetSharedMemoryAs<GLfloat*>()[0] = 0;
107 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));
108 }
109
110 TEST_F(GLES2DecoderTest3, LoadMatrixfImmediateValidArgs) {
111 cmds::LoadMatrixfImmediate& cmd =
112 *GetImmediateAs<cmds::LoadMatrixfImmediate>();
113 SpecializedSetup<cmds::LoadMatrixfImmediate, 0>(true);
114 GLfloat temp[16] = {0, };
115 cmd.Init(&temp[0]);
116 EXPECT_CALL(
117 *gl_,
118 LoadMatrixf(reinterpret_cast<GLfloat*>(ImmediateDataAddress(&cmd))));
119 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp)));
120 EXPECT_EQ(GL_NO_ERROR, GetGLError());
121 }
122
123 TEST_F(GLES2DecoderTest3, LoadIdentityValidArgs) {
124 EXPECT_CALL(*gl_, LoadIdentity());
125 SpecializedSetup<cmds::LoadIdentity, 0>(true);
126 cmds::LoadIdentity cmd;
127 cmd.Init();
128 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
129 EXPECT_EQ(GL_NO_ERROR, GetGLError());
130 }
71 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_ 131 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698