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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 2 08:05:59 PDT 2010


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





--- Comment #42 from W. James MacLean <wjmaclean at chromium.org>  2010-09-02 08:05:59 PST ---
(In reply to comment #41)

Does this seem reasonable?

My thinking is this: the WebRect passed to WebViewImpl::paint() has x, y, width, height. Since x, y may be non-zero, we need to consider whether 

(x1,y1) = (x+width-1, y+height-1) // location of corner of rect

satisfies

x1 < rootTextureLayerSize.width()
y1 < rootTextureLayerSize.height()

So we do 

x1 = min(x1, rootTextureLayerSize.width() - 1);
y1 = min(y1, rootTextureLayerSize.height() - 1);

We now create resizeRect(x,y,x1-x+1,y1-y+1) [i.e. we clip rect to the rootTextureLayer] and a readback buffer of size (x1+1,y1+1). If resizeRect.width == (0, 0, bitmap.width(), bitmap.height()) then we can readback directly to the existing bitmap pixel buffer and not allocate a secondary buffer, but otherwise we allocate a temporary buffer.

If we allocate a temp buffer, we read back the pixels, and draw them into the bitmap using

srcRect = resizeRect
dstRect = (0, 0, bitmap.width(), bitmap.height()) 

with re-scaling enabled.

resizeRect can be computed in paint() in a platform-independent way, and passed to the platform-specific code (bitmap rects can only be determined in the platform-specific code sections).

-- 
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