[DO NOT MERGE] Full - Compatibilize winscope with master

Bug: 194813677
Test: none
Change-Id: Ie55429dcb746f597f80dfdaa68cbef19f5820005
This commit is contained in:
Nataniel Borges
2021-07-28 07:13:45 +00:00
parent 642782a098
commit f230a13f30
56 changed files with 2789 additions and 2867 deletions

View File

@@ -33,14 +33,21 @@
v-for="(surface, index) in sufacesAffectedBy(source)"
v-bind:key="surface.id"
>
<!-- eslint-disable-next-line max-len -->
<span v-if="surface.name" class="surface-name">{{ surface.name }}</span>
<span class="surface-id">
<!-- eslint-disable-next-line max-len -->
<span v-if="surface.name">(</span>{{surface.id}}<span v-if="surface.name">)</span>
<span
v-if="simplifyNames && surface.shortName &&
surface.shortName !== surface.name"
>{{surface.shortName}}>
</span>
<span v-else>
<!-- eslint-disable-next-line max-len -->
<span v-if="surface.name" class="surface-name">{{ surface.name }}</span>
<span class="surface-id">
<!-- eslint-disable-next-line max-len -->
<span v-if="surface.name">(</span>{{surface.id}}<span v-if="surface.name">)</span>
</span>
<!-- eslint-disable-next-line max-len -->
<span v-if="index + 1 < sufacesAffectedBy(source).length">,&nbsp;</span>
</span>
<!-- eslint-disable-next-line max-len -->
<span v-if="index + 1 < sufacesAffectedBy(source).length">,&nbsp;</span>
</span>
</div>
<div class="extra-info-column">
@@ -59,6 +66,8 @@
</template>
<script>
import { shortenName } from './flickerlib/mixin'
export default {
name: 'transaction-entry',
props: {
@@ -83,6 +92,9 @@ export default {
prettifyTransactionId: {
type: Function,
},
simplifyNames: {
type: Boolean,
},
},
computed: {
currentTimestamp() {
@@ -135,8 +147,12 @@ export default {
},
sufacesAffectedBy(transaction) {
if (transaction.type !== 'transaction') {
// TODO (b/162402459): Shorten layer name
return [{name: transaction.layerName, id: transaction.obj.id}];
return [
{
name: transaction.layerName,
shortName: shortenName(transaction.layerName),
id: transaction.obj.id
}];
}
const surfaceIds = new Set();
@@ -145,7 +161,12 @@ export default {
const id = transaction.obj.id;
if (!surfaceIds.has(id)) {
surfaceIds.add(id);
affectedSurfaces.push({name: transaction.layerName, id});
affectedSurfaces.push(
{
name: transaction.layerName,
shortName: shortenName(transaction.layerName),
id
});
}
}