• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <composer-vts/2.4/TestCommandReader.h>
18 
19 #include <gtest/gtest.h>
20 
21 namespace android::hardware::graphics::composer::V2_4::vts {
22 
parseSingleCommand(int32_t commandRaw,uint16_t length)23 void TestCommandReader::parseSingleCommand(int32_t commandRaw, uint16_t length) {
24     IComposerClient::Command command = static_cast<IComposerClient::Command>(commandRaw);
25 
26     switch (command) {
27         case IComposerClient::Command::SET_CLIENT_TARGET_PROPERTY:
28             ASSERT_EQ(2, length);
29             read();
30             close(readFence());
31             break;
32         default:
33             return android::hardware::graphics::composer::V2_1::vts::TestCommandReader::
34                     parseSingleCommand(commandRaw, length);
35     }
36 }
37 
38 }  // namespace android::hardware::graphics::composer::V2_4::vts
39