Path: blob/21.2-virgl/src/gallium/auxiliary/driver_trace/trace.xsl
4565 views
<?xml version="1.0"?>12<!--34Copyright 2008 VMware, Inc.5All Rights Reserved.67Permission is hereby granted, free of charge, to any person obtaining a8copy of this software and associated documentation files (the9"Software"), to deal in the Software without restriction, including10without limitation the rights to use, copy, modify, merge, publish,11distribute, sub license, and/or sell copies of the Software, and to12permit persons to whom the Software is furnished to do so, subject to13the following conditions:1415The above copyright notice and this permission notice (including the16next paragraph) shall be included in all copies or substantial portions17of the Software.1819THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS20OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF21MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.22IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR23ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,24TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE25SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.2627!-->2829<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">3031<xsl:output method="html" />3233<xsl:strip-space elements="*" />3435<xsl:template match="/trace">36<html>37<head>38<title>Gallium Trace</title>39</head>40<style>41body {42font-family: verdana, sans-serif;43font-size: 11px;44font-weight: normal;45text-align : left;46}4748.fun {49font-weight: bold;50}5152.var {53font-style: italic;54}5556.typ {57display: none;58}5960.lit {61color: #0000ff;62}6364.ptr {65color: #008000;66}67</style>68<body>69<ol class="calls">70<xsl:apply-templates/>71</ol>72</body>73</html>74</xsl:template>7576<xsl:template match="call">77<li>78<xsl:attribute name="value">79<xsl:apply-templates select="@no"/>80</xsl:attribute>81<span class="fun">82<xsl:value-of select="@class"/>83<xsl:text>::</xsl:text>84<xsl:value-of select="@method"/>85</span>86<xsl:text>(</xsl:text>87<xsl:apply-templates select="arg"/>88<xsl:text>)</xsl:text>89<xsl:apply-templates select="ret"/>90</li>91</xsl:template>9293<xsl:template match="arg|member">94<xsl:apply-templates select="@name"/>95<xsl:text> = </xsl:text>96<xsl:apply-templates />97<xsl:if test="position() != last()">98<xsl:text>, </xsl:text>99</xsl:if>100</xsl:template>101102<xsl:template match="ret">103<xsl:text> = </xsl:text>104<xsl:apply-templates />105</xsl:template>106107<xsl:template match="bool|int|uint|float|enum">108<span class="lit">109<xsl:value-of select="text()"/>110</span>111</xsl:template>112113<xsl:template match="bytes">114<span class="lit">115<xsl:text>...</xsl:text>116</span>117</xsl:template>118119<xsl:template match="string">120<span class="lit">121<xsl:text>"</xsl:text>122<xsl:call-template name="break">123<xsl:with-param name="text" select="text()"/>124</xsl:call-template>125<xsl:text>"</xsl:text>126</span>127</xsl:template>128129<xsl:template match="array|struct">130<xsl:text>{</xsl:text>131<xsl:apply-templates />132<xsl:text>}</xsl:text>133</xsl:template>134135<xsl:template match="elem">136<xsl:apply-templates />137<xsl:if test="position() != last()">138<xsl:text>, </xsl:text>139</xsl:if>140</xsl:template>141142<xsl:template match="null">143<span class="ptr">144<xsl:text>NULL</xsl:text>145</span>146</xsl:template>147148<xsl:template match="ptr">149<span class="ptr">150<xsl:value-of select="text()"/>151</span>152</xsl:template>153154<xsl:template match="@name">155<span class="var">156<xsl:value-of select="."/>157</span>158</xsl:template>159160<xsl:template name="break">161<xsl:param name="text" select="."/>162<xsl:choose>163<xsl:when test="contains($text, '
')">164<xsl:value-of select="substring-before($text, '
')"/>165<br/>166<xsl:call-template name="break">167<xsl:with-param name="text" select="substring-after($text, '
')"/>168</xsl:call-template>169</xsl:when>170<xsl:otherwise>171<xsl:value-of select="$text"/>172</xsl:otherwise>173</xsl:choose>174</xsl:template>175176<xsl:template name="replace">177<xsl:param name="text"/>178<xsl:param name="from"/>179<xsl:param name="to"/>180<xsl:choose>181<xsl:when test="contains($text,$from)">182<xsl:value-of select="concat(substring-before($text,$from),$to)"/>183<xsl:call-template name="replace">184<xsl:with-param name="text" select="substring-after($text,$from)"/>185<xsl:with-param name="from" select="$from"/>186<xsl:with-param name="to" select="$to"/>187</xsl:call-template>188</xsl:when>189<xsl:otherwise>190<xsl:value-of select="$text"/>191</xsl:otherwise>192</xsl:choose>193</xsl:template>194195</xsl:transform>196197198