[Webkit-unassigned] [Bug 44127] [chromium] Thumbnails not generated for GPU Rendered Pages

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 18:14:08 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44127





--- Comment #68 from W. James MacLean <wjmaclean at chromium.org>  2010-09-09 18:14:07 PST ---
(In reply to comment #67)
> (From update of attachment 67085 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=67085&action=prettypatch
> 
> > WebKit/chromium/src/WebViewImpl.cpp:971
> > +    // Compute rect to sample from in inverted GPU buffer.
> typo: in inverted

Thanks, will fix.

> > WebKit/chromium/src/WebViewImpl.cpp:972
> > +    IntRect invertRect(rect.x(), bitmapHeight - (rect.y() + rect.height()), rect.width(), rect.height());
> rect.y + rect.height I believe is returned by rect.bottom() .  I'm curious though, isn't adding a Y offset here equivalent to some gc.translate further down?  It seems that you would only need one of the two, with the appropriate values. I'd venture to say maybe replace your current gc.translate by a gc.translate(FloatSize(0, rect.bottom())  but use the original rect?

Yes, I could use rect.bottom(). Note that the expression above changes the sign of rect.y() also.

Assuming that the value (x,y)=(0,0) in the WebRect passed into paint() is meant to be top-left (with y values increasing downward), then it will be necessary to transform the rect *before* passing it to getFramebufferPixels, as the GPU is mapping (0,0) to the bottom-left, with y-values increasing upwards.

If rect is (0,0,root_texture_width, root_texture_height) then this transformation doesn't change the rect, and then the gc transforms invert what is returned. But if rect is anything else, then it must be transformed before the pixels are read back, and the returned bitmap must be transformed again when writing into the gc to flip it vertically.

I tried it using just the original rect for the gc writeback, but it seems the draw function wants to transform the destRect coordinates prior to doing the draw. 

It seems obvious that rect must be transformed before the gpu read-back can be done. If glReadPixels() allowed one to flip the pixels vertically during the read it would help, but it doesn't.

Does that make sense?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list