2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package com.drawelements.deqp.runner;
19 * Test configuration of dEPQ test instance execution.
21 public class BatchRunConfiguration {
22 public static final String ROTATION_UNSPECIFIED = "unspecified";
23 public static final String ROTATION_PORTRAIT = "0";
24 public static final String ROTATION_LANDSCAPE = "90";
25 public static final String ROTATION_REVERSE_PORTRAIT = "180";
26 public static final String ROTATION_REVERSE_LANDSCAPE = "270";
28 private final String mGlConfig;
29 private final String mRotation;
30 private final String mSurfaceType;
31 private final boolean mRequired;
33 public BatchRunConfiguration(String glConfig, String rotation, String surfaceType,
37 mSurfaceType = surfaceType;
42 * Get string that uniquely identifies this config
44 public String getId() {
45 return String.format("{glformat=%s,rotation=%s,surfacetype=%s,required=%b}",
46 mGlConfig, mRotation, mSurfaceType, mRequired);
50 * Get the GL config used in this configuration.
52 public String getGlConfig() {
57 * Get the screen rotation used in this configuration.
59 public String getRotation() {
64 * Get the surface type used in this configuration.
66 public String getSurfaceType() {
71 * Is this configuration mandatory to support, if target API is supported?
73 public boolean isRequired() {
78 public boolean equals(Object other) {
81 } else if (!(other instanceof BatchRunConfiguration)) {
84 return getId().equals(((BatchRunConfiguration)other).getId());
89 public int hashCode() {
90 return getId().hashCode();