1e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck/*
2e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * Copyright (C) 2015 The Android Open Source Project
3e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck *
4e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * Licensed under the Apache License, Version 2.0 (the "License");
5e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * you may not use this file except in compliance with the License.
6e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * You may obtain a copy of the License at
7e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck *
8e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck *      http://www.apache.org/licenses/LICENSE-2.0
9e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck *
10e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * Unless required by applicable law or agreed to in writing, software
11e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * distributed under the License is distributed on an "AS IS" BASIS,
12e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * See the License for the specific language governing permissions and
14e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck * limitations under the License.
15e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck */
16e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck
178160f20b0aca8c6595d4b385d673f59b6bcd16a4Chris Craik#include "tests/common/TestScene.h"
1816c9d6a92e1b86d448c00c52a1630f3e71e6df76John Reck
19e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Recknamespace android {
20e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Recknamespace uirenderer {
2127e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craiknamespace test {
22e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck
2327e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik// Not a static global because we need to force the map to be constructed
2427e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik// before we try to add things to it.
2527e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craikstd::unordered_map<std::string, TestScene::Info>& TestScene::testMap() {
2627e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    static std::unordered_map<std::string, TestScene::Info> testMap;
2727e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    return testMap;
2816c9d6a92e1b86d448c00c52a1630f3e71e6df76John Reck}
29e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck
3027e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craikvoid TestScene::registerScene(const TestScene::Info& info) {
3127e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik    testMap()[info.name] = info;
3227e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik}
33e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck
3427e58b4f54d693ff1db7ab2edb5d47ca296c1278Chris Craik} /* namespace test */
35e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck} /* namespace uirenderer */
36e702c9cd6a2b9b1378f740a79b0e349a9b02660fJohn Reck} /* namespace android */
37