<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 11:26 PM, Laurent Aimar <span dir="ltr"><<a href="mailto:fenrir@elivagar.org">fenrir@elivagar.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 Because, you need to do it when calling ID2D1HwndRenderTarget_DrawBitmap<br>
(not sure it's the right place) using rect_src_clipped.</blockquote><div><br>I've done this when I copy the picture into the bitmap.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Also, it means you can simply declare a picture of<br>
width equals to picture->p[0].i_pitch/4 for the above issue but copy only<br>
the real size.<br></blockquote><div><br>Well I can't create a bitmap with width = picture->p[0].i_pitch/4 really because at the point where I create the bitmap, there is no picture. Reallocating bitmap resources is extremely expensive (that's why it's only done once and memory is copied into it).<br>
The only way I can see is the have a bitmap with width = fmt->width because that doesn't change and is available at the time we need it.<br></div></div></div>