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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 27 08:25:56 PDT 2010


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





--- Comment #18 from W. James MacLean <wjmaclean at chromium.org>  2010-08-27 08:25:56 PST ---
(In reply to comment #17)
> (From update of attachment 65465 [details])
> 
> WebCore/platform/graphics/chromium/LayerRendererChromium.h:94
>  +      int getRootLayerTextureWidth() const { return m_rootLayerTextureWidth; }
> Accessors don't typically start with get.  These two should be: rootLayerTextureWidth() and rootLayerTextureHeight()

Done.

> WebKit/chromium/src/WebViewImpl.cpp:118
>  +  #if WEBKIT_USING_CG
> The WebCore code has been using
> #if PLATFORM(CG) instead of WEBKIT_USING_CG
> 
> WebKit/chromium/src/WebViewImpl.cpp:984
>  +  #if WEBKIT_USING_SKIA
> #if PLATFORM(SKIA)

I tried this initially, but it didn't work for me ... PLATFORM(SKIA) was true during compilation on the Mac, meaning the CG code didn't get compiled when it should have. This is why I was using WEBKIT_USING_SKIA and WEBKIT_USING_CG.

Any suggestions about what I may have been doing wrong in my use of "#if PLATFORM(SKIA)"?

> WebKit/chromium/src/WebViewImpl.cpp:989
>  +              int rowBytes = bitmap.rowBytes();
> In getFramebufferPixels() we assume that we have 4 bytes per pixel (RGBA).  If rowBytes doesn't match 4*width then we're in trouble.  Maybe better here to do an:
> 
> ASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config)

Done.

> and not pass the rowBytes down to getFrameBufferPixels.

Done.

> WebKit/chromium/src/WebViewImpl.cpp:1002
>  +                  OwnPtr<skia::PlatformCanvas> canvas2 = OwnPtr<skia::PlatformCanvas>(new skia::PlatformCanvas());
> Please use a more descriptive name for canvas2 and bitmap2

Done - now canvasResize and bitmapResize

> WebKit/chromium/src/WebViewImpl.cpp:1016
>  +  
> ASSERT(rowBytes == width * 4) 

Done.

> WebKit/chromium/src/WebViewImpl.cpp:1007
>  +                      canvas->drawBitmap(bitmap2, 0, 0, 0);
> I think you want to call drawBitmapRect here to specify that the target size if the size of your WebCanvas so that you get the scaling.

Done.

> WebKit/chromium/src/WebViewImpl.cpp:999
>  +                  height = m_layerRenderer->getRootLayerTextureHeight();
> these variables shadow the width and height defined in the outside scope and make things confusing (plus I think you need the canvas width further down anyway).  Please rename.

Done - widthResize, heightResize

> WebKit/chromium/src/WebViewImpl.cpp:1010
>  +  #elif WEBKIT_USING_CG
> #if PLATFORM(CG)

See comments above.

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