Salut, I've been trying to use a single bitmap, but it is much more work than I expected... And I couldn't get it to work flawlessly yet either... I get some refresh problems once in a while that I can't figure out... I solved many little bumps on the way, but now it works in most cases, except more complex pages like Google maps, which are giving me a lot of trouble... Here's what I'm doing:
- In RenderWidget::DoDeferredPaint(), I create a drawing canvas the size of the union of all invalidated rects (I also tried creating one the size of the whole view rect, just to see... and it didn't help). - I translate the canvas based on the origin of the union rect, and then call webwidget_->Paint() for each invalidated rect individually, properly setting the clip rect on the canvas. (When I try with a bitmap the size of the whole view rect, I skip the translation, of course.) - I send that single bitmap with its rect and the list of sub-rects to paint. - In RenderWidgethost::PaintBackingStoreRects(), I now pass a vector of rects to paint, and the rect of the whole bitmap to paint from. I added a loop to call BackingStoreManager::PrepareBackingStore() for each rect to paint. - The BackingStore::PaintRect() method now receives the rect for the bitmap (as well as the rect to paint, since they are not necessarily the same anymore). I then use this to specify the source origin point in the bitmap where to point from. I still want to investigate a few things before I clean up the current version I have of this code and upload it to rietveld so that people can look at it and give me hints as to where I may have goofed... But if you already have hints as to what could not be working in the approach I described above, please send them my way... If you want more details about the approach and/or the problems that I'm having, let me know, and I will send them to you... Thanks! BYE MAD P.S.: I'm actually wondering if I'm wasting my time here... I tried to to some profiling anyway, even though the code doesn't work flawlessly... And I have not seen any dramatic improvements... Though as I said before, I don't think I can trust the numbers I get on my machine... So I keep digging... On Tue, May 5, 2009 at 6:26 PM, Marc-Andre Decoste <[email protected]> wrote: > OK, I'll make the change... Interestingly, this was my original idea, but I > misunderstood your initial suggestions thinking you preferred an array of > bitmaps too... > I'll send a notice once I uploaded a new patch... > > Thanks! > > BYE > MAD > > > On Tue, May 5, 2009 at 6:08 PM, Adam Langley <[email protected]> wrote: > >> On Tue, May 5, 2009 at 3:00 PM, Marc-Andre Decoste <[email protected]> >> wrote: >> > That would be awsome... >> > I just uploaded the patch here: >> > http://codereview.chromium.org/108040 >> >> At a high level, you're using one TransportDIB per rectangle, but it >> should be one per message (with multiple rects worth of image data >> inside). You can't really use any benchmarking results while this is >> the case. >> >> >> AGL >> > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
