[Development] Painting an image onto itself

Thiago Macieira thiago.macieira at intel.com
Wed Apr 11 01:11:27 CEST 2012


On quarta-feira, 11 de abril de 2012 01.04.10, Christoph Feck wrote:
> On Wednesday 11 April 2012 00:52:33 Thiago Macieira wrote:
> > The guarantees we give change how we can optimise this code. I'll
> > be satisfied if we require that no single pixel is both source and
> > destination.
> 
> I have seen code that do tiled fills by first blitting a source image
> (lets say 100x100 pixels) to pos (0, 0), then blitting rect
> (0,0,100,100) to (0,100,100,100), then (0,0,200,100) to
> (0,200,200,100) etc., effectively doubling the filled size with each
> blit.

0x100+100+100 is pixels (0,100) to (99,199), so it doesn't overlap with 
0x0+100+100 ((0,0) to (99,99)). That shouldn't be a problem.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120410/357a573f/attachment.sig>


More information about the Development mailing list