Remove colour attributes from body and strip most of the font tags out
This commit is contained in:
parent
7e957c0bb4
commit
c1f88ddb41
362 changed files with 1632 additions and 1706 deletions
|
|
@ -24,7 +24,7 @@
|
|||
<!--CHAPTER=39//-->
|
||||
<!--PAGES=733-735//-->
|
||||
<!--UNASSIGNED1//-->
|
||||
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
|
||||
<!--UNASSIGNED2//--></HEAD><body>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
|
|
@ -134,10 +134,10 @@ _DrawHorizontalLineList endp
|
|||
end
|
||||
</PRE>
|
||||
<!-- END CODE //-->
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading7"></A><FONT COLOR="#000077">Maximizing REP STOS</FONT></H4>
|
||||
<H4 ALIGN="LEFT"><A NAME="Heading7"></A>Maximizing REP STOS</H4>
|
||||
<P>Listing 39.3 doesn’t take the easy way out and use <B>REP STOSB</B> to fill each scan line; instead, it uses <B>REP STOSW</B> to fill as many pixel pairs as possible via word-sized accesses, using <B>STOSB</B> only to do odd bytes. Word accesses to odd addresses are always split by the processor into 2-byte accesses. Such word accesses take twice as long as word accesses to even addresses, so Listing 39.3 makes sure that all word accesses occur at even addresses, by performing a leading <B>STOSB</B> first if necessary.</P>
|
||||
<P>Listing 39.3 is another case in which it’s worth knowing the environment in which your code will run. Extra code is required to perform aligned word-at-a-time filling, resulting in extra overhead. For very small or narrow polygons, that overhead might overwhelm the advantage of drawing a word at a time, making plain old <B>REP STOSB</B> faster.</P>
|
||||
<H3><A NAME="Heading8"></A><FONT COLOR="#000077">Faster Edge Tracing</FONT></H3>
|
||||
<H3><A NAME="Heading8"></A>Faster Edge Tracing</H3>
|
||||
<P>Finally, Listing 39.4 is an assembly language version of <B>ScanEdge</B>. Listing 39.4 is a relatively straightforward translation from C to assembly, but is nonetheless about twice as fast as Listing 39.2.</P>
|
||||
<P>The version of <B>ScanEdge</B> in Listing 39.4 could certainly be sped up still further by unrolling the loops. <B>FillConvexPolygon</B>, the overall coordination routine, hasn’t even been converted to assembly language, so that could be sped up as well. I haven’t bothered with these optimizations because all code other than <B>DrawHorizontalLineList</B> takes only 14 percent of the overall polygon filling time when drawing to display memory; the potential return on optimizing nondrawing code simply isn’t great enough to justify the effort. Part of the value of a profiler is being able to tell when to stop optimizing; with Listings 39.3 and 39.4 in use, more than two-thirds of the time taken to draw polygons is spent waiting for display memory, so optimization is pretty much maxed out. However, further optimization might be worthwhile when drawing to system memory, where wait states are out of the picture and the nondrawing code takes a significant portion (46 percent) of the overall time.</P>
|
||||
<P>Again, <I>know where the cycles go</I> .</P>
|
||||
|
|
@ -154,7 +154,7 @@ _DrawHorizontalLineList endp
|
|||
|
||||
<hr width="90%" size="1" noshade>
|
||||
<div align="center">
|
||||
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book © 2001 Michael Abrash</font>
|
||||
Graphics Programming Black Book © 2001 Michael Abrash
|
||||
</div>
|
||||
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
|
||||
<!-- reference_subfoot = footer -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue