Tutorial
FM4, S6E2DH/S6E2DF/S6E2D5/S6E2D3 Series, 32-Bit Microcontroller, Graphic Driver User Manual, Doc. No. 002-04387 Rev. *A
61
6.9.1.5
Render time visualization
If the render time is critical for a single buffer solution it might be helpful to visualize the render time. The sample
application blits for both render parts a red line at different positions on the left side of the screen. Different to all
other blits this line will be drawn over the whole surface including the part that is currently read by the display
controller. The display will not show the line while the render task is still ongoing. But if the blit queue executes this
line drawing operation the display controller will read this new rendered object.
Figure 27. Render time analysis
The application supports the keys on the developer board. For this example the up and down keys can be used to
modify the line split of the upper and lower part. It can be used to force a wrong splitting and see the render issues.
The left key can be used to switch off the background animation. You can see a relaxed render time in that case.
6.9.1.6
Render tricks
The following render tricks are used for this sample:
Background animation: Two rotated and up scaled buffers with weak alpha value generate the background
animation.
Mask buffer multiplication: To draw the diagram it is necessary to modify the cylinderical bar height. Scaling is
not possible because it deforms the 3D-optic. Therefore the sample reads for each cylinderical bar and blit the
bitmap twice. The MASK surface only needs the alpha channel of the bitmap. The SRC surface reads the alpha
and the color channels of the bitmap but with a vertical offset realized by a geometry matrix operation. The
default operation for MASK and SRC surface is alpha multiplication. An additional constant alpha multiplication
realizes the semi-transparency of some bars. The result of this product is finally used for the blend operation
against the animated background.
Color modification: The sample uses the color matrix to colorize the gray image source.