[Mesa-dev] [PATCH v3] egl/android: support for EGL_KHR_partial_update

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 6 14:00:02 UTC 2017


On 6 June 2017 at 14:54, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> On Monday, 2017-06-05 17:04:28 +0100, Emil Velikov wrote:
>> > + * If the width of the passed rect is greater than the surface's
>> > + * width then it is clamped to the width of the surface. Same with
>> > + * height.
>> > + */
>> > +
>> > +static void
>> > +_eglSetDamageRegionKHRClampRects(_EGLDisplay* disp, _EGLSurface* surf,
>> > +                                 EGLint *rects, EGLint n_rects)
>> > +{
>> > +   EGLint i;
>> > +   EGLint surfHeight = surf->Height;
>> > +   EGLint surfWidth = surf->Width;
>> > +
>> > +   for (i = 0; i < (4 * n_rects); i += 4) {
>> Do we really need the "4 *" here?
>
> We need it somewhere, and I prefer it in the for(i < 4 * n) rather than
> in each rects[4*i + foo] :)
> Agreed with everything else you said though.

FTR Harish poked me about this and seemingly I've misread the spec -
rects length's is not n_rects :-\
Hence my suggestion here and the similar one in
droid_set_damage_region() is misleading.

-Emil


More information about the mesa-dev mailing list