Different performances of vertical and horizontal clip area in draw context

I'm developing a watch face with partialUpdates for the seconds clock hand and I found that there is a big difference between a horizontal clipping area or a vertical one.

For example with a clipping area of 145px of width and 7px of height I get a DisplayTime of 4500 but with te same area size but vertical (7px width and 145px height) the DisplayTime is 29000. I've seen the same behavior on code samples but it's a big constrain in order to mantain the execution time as lower as possible.

Anyone knows a strategy to avoid it?

Thanks.
  • You'll see something similar with the Analog sample in the SDK, and that's been tuned by Garmin. With an analog second hand the power usage is like a sine way over a minute, with peaks at 12 and 6 and lows and 9 and 3. The way the display works is it updates by row, so the more rows, the more of an impact.

    This is why an analog second hand is much trickier than a digital display of seconds.
  • Former Member
    Former Member over 6 years ago
    This is a reflection of how the hardware behaves on the products being emulated. The display time represents the amount of time the system must be active to transmit the modified pixels to the display. The displays used on our existing generations of products can minimally update an entire row of pixels. A consequence of this is that your horizontal clipping has no impact on the power budget. (1 x N is equivalent to 240 x N). We realize that this restricts some UI design options, but it is an accurate reflection of the power impact on these products.
  • I figured something like this thanks for the confirmation. I managed to reduce the execution and graphics time to keep the powerbudget under 30 ms (on average) mantaining the design but too near I think my watchface consume 2% more of battery per day than the official ones. I will keep trying to reduce the PartialUpdateTime to get better results.

    Thanks for the help!!
  • That explanation makes sense, kind of like old TVs worked. Explains the difference in performance in these two very simple functions.

    function drawLinesH(dc) {
            for (var i=0; i<=416; i++) {
                dc.drawLine(0, i, 416, i);
            }
        }

        function drawLinesV(dc) {
            for (var i=0; i<=416; i++) {
                dc.drawLine(i, 0, i, 416);
            }
        }