On 6 June 2017 at 14:54, Eric Engestrom <eric.engest...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev