Variant: Both (ScreenPlay and non-ScreenPlay). Target audience: Application developers.
Symbian recommends that all
For example, suppose an application wants to write the text "Hello!" to a window and then add a red diagonal line below it (A in following diagram). When this is performed as redraw drawing, the application calculates the bounding rectangles of the "Hello!" text and the red line (B). For each one, the application passes the rectangle to
This has the advantage that the Window Server knows that the area of the window that has the "Hello!" text is not affected by the drawing of the red line. There are also advantages when some or all of the window needs to be repainted. For example, suppose another window (such as an OK dialog box) appears above the window (as shown in C). When the dialog box is closed, the Window Server repaints the screen behind the dialog box. Because in this example the OK dialog box was entirely within the red line's bounding rectangle, the Window Server simply replays that rectangle's drawing operations (D). This is more efficient than repainting the whole window.
However, in earlier versions of Symbian you could, for example, draw the red line without bracketing it within
This is less efficient than the Window Server replaying the draw operations for the affected area.
Symbian recommends that all drawing is now performed as redraw drawing. Typically this involves dividing the window up into rectangular areas that represent different aspects of the user interface—for example, as shown in the following diagram. If anything spoils the screen, the Window Server then only needs to redraw the corresponding portions of the user interface.
In earlier versions of Symbian, before the introduction of the
Symbian recommends that all non-redraw drawing is changed to redraw drawing. Sometimes this causes some subtle changes in behavior, as explained below.
You must supply only drawing operations between the
You must not call any functions that can leave between the
Note: A redrawer's
Migrating non-redraw drawing to redraw drawing means that you must enclose all drawing operations between
Performance
You can improve performance by passing the smallest possible bounding rectangle to the
Delay of execution
After you migrate non-redraw drawing to redraw drawing, the execution of the drawing operations is deferred compared to previously. This means that if the arguments of the drawing operations result in a panic, the panic also appears later than before.
CRemoteGc usage
Device creators can use
For example, consider a weather program that has one sub-system responsible for deciding the drawing operations that comprise a weather symbol and another sub-system that places weather symbols at different locations on the screen. Here we potentially have a Cloud symbol buffer created once and played many times.
The points to note are:
Any
You must bracket any call to
It may be puzzling to understand why any
In both ScreenPlay and the non-ScreenPlay variant, you can configure the TechView emulator to panic clients that ignore the convention (described above) that all drawing operations are performed as redraw drawing.
To enable this feature, add the following line to the
This feature is disabled if you do not specify this parameter or if you set it to zero, like this:
The feature takes effect in debug emulator (WINSCW) builds only—it never affects ARM builds.
When a Window Server panic code 79 (
However, the Window Server buffers client requests. This means that the drawing that is at fault may have been issued by the client some time earlier. It is therefore helpful to enable autoflushing, because this removes the buffering between the client issuing the drawing operations and the Window Server processing them. This makes it easier to identify the drawing operation that is at fault.
There are three ways to enable autoflushing:
To enable autoflushing globally across all clients, define
To enable autoflushing in your client-side code only, call
To enable autoflushing on an ad hoc basis in the TechView emulator, press
Variant: Both (ScreenPlay and non-ScreenPlay). Target +audience: Application developers.
+Symbian recommends that all
For example, suppose an application wants to write the text "Hello!"
+to a window and then add a red diagonal line below it (A in following
+diagram). When this is performed as redraw drawing, the application
+calculates the bounding rectangles of the "Hello!" text and the red
+line (B). For each one, the application passes the rectangle to
This has the advantage that the Window Server knows that +the area of the window that has the "Hello!" text is not affected +by the drawing of the red line. There are also advantages when some +or all of the window needs to be repainted. For example, suppose another +window (such as an OK dialog box) appears above the window (as shown +in C). When the dialog box is closed, the Window Server repaints the +screen behind the dialog box. Because in this example the OK dialog +box was entirely within the red line's bounding rectangle, the Window +Server simply replays that rectangle's drawing operations (D). This +is more efficient than repainting the whole window.
However,
+in earlier versions of Symbian you could, for example, draw the red
+line without bracketing it within
This is less efficient than the Window Server replaying +the draw operations for the affected area.
Symbian recommends +that all drawing is now performed as redraw drawing. Typically this +involves dividing the window up into rectangular areas that represent +different aspects of the user interface—for example, as shown in the +following diagram. If anything spoils the screen, the Window Server +then only needs to redraw the corresponding portions of the user interface.
In earlier versions of Symbian, before the introduction
+of the
Symbian recommends
+that all non-redraw drawing is changed to redraw drawing. Migrating
+non-redraw drawing to redraw drawing means that you must enclose all
+drawing operations between
You must supply only drawing operations between the
For opaque windows,
+you must define pixel content for the entire area being redrawn.
+For example, when calling
You must not call any functions that can leave between the
Note: A redrawer's
Performance
You can improve performance by passing
+the smallest possible bounding rectangle to the
High frequency rendering
It is possible for a client to provide batches of redraw
+drawing (that is, drawing bracketed in
The solution is to call
To summarize: When you
+want to ensure that every single frame is shown on the screen, call
Delay of execution
After you migrate non-redraw +drawing to redraw drawing, the execution of the drawing operations +is deferred compared to previously. This means that if the arguments +of the drawing operations result in a panic, the panic also appears +later than before.
CRemoteGc usage
Device
+creators can use
For example, consider a weather program that has one sub-system +responsible for deciding the drawing operations that comprise a weather +symbol and another sub-system that places weather symbols at different +locations on the screen. Here we potentially have a Cloud symbol buffer +created once and played many times.
The points to note are:
Any
You must bracket any call to
It may be puzzling to understand why any
In both ScreenPlay and the non-ScreenPlay variant, you can configure +the TechView emulator to panic clients that ignore the convention +(described above) that all drawing operations are performed as redraw +drawing.
To enable this feature, add the following line to
+the
This feature is disabled if you do not specify this parameter +or if you set it to zero, like this:
The feature takes effect in debug emulator (WINSCW) builds only—it +never affects ARM builds.
When a Window Server panic code
+79 (
However, the Window Server buffers client requests. This means that +the drawing that is at fault may have been issued by the client some +time earlier. It is therefore helpful to enable autoflushing, because this removes the buffering between the client issuing the +drawing operations and the Window Server processing them. This makes +it easier to identify the drawing operation that is at fault.
There are three ways to enable autoflushing:
To enable autoflushing
+globally across all clients, define
To enable autoflushing
+in your client-side code only, call
To enable autoflushing
+on an ad hoc basis in the TechView emulator, press