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 17export class Chip { 18 short: string; 19 long: string; 20 type: string; 21 22 constructor(short: string, long: string, type: string) { 23 this.short = short; 24 this.long = long; 25 this.type = type; 26 } 27} 28 29export const VISIBLE_CHIP = new Chip('V', 'visible', 'default'); 30 31export const RELATIVE_Z_CHIP = new Chip( 32 'RelZ', 33 'Is relative Z-ordered to another surface', 34 'warn', 35); 36 37export const RELATIVE_Z_PARENT_CHIP = new Chip( 38 'RelZParent', 39 'Something is relative Z-ordered to this surface', 40 'warn', 41); 42 43export const MISSING_LAYER = new Chip( 44 'MissingLayer', 45 'This layer was referenced from the parent, but not present in the trace', 46 'error', 47); 48 49export const GPU_CHIP = new Chip( 50 'GPU', 51 'This layer was composed on the GPU', 52 'gpu', 53); 54 55export const HWC_CHIP = new Chip( 56 'HWC', 57 'This layer was composed by Hardware Composer', 58 'hwc', 59); 60 61export const DUPLICATE_CHIP = new Chip( 62 'Duplicate', 63 "Multiple layers present with this layer's id", 64 'duplicate', 65); 66 67export const MISSING_Z_PARENT_CHIP = new Chip( 68 'MissingZParent', 69 'Is relative Z-ordered to another surface, but RelZParent is missing from hierarchy', 70 'zParent', 71); 72