[Webkit-unassigned] [Bug 76635] Refactor canvas drawing to be more data driven

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 19 11:06:59 PST 2012


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





--- Comment #2 from Adrienne Walker <enne at google.com>  2012-01-19 11:06:59 PST ---
(From update of attachment 123126)
View in context: https://bugs.webkit.org/attachment.cgi?id=123126&action=review

> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:687
> +    if (!quad->hasAlpha()) {
> +        // Even though the WebGL layer's texture was likely allocated
> +        // as GL_RGB, disable blending anyway for better robustness.
> +        context()->disable(GraphicsContext3D::BLEND);
> +    } else {
> +        GC3Denum sfactor = quad->premultipliedAlpha() ? GraphicsContext3D::ONE : GraphicsContext3D::SRC_ALPHA;
> +        GLC(context(), context()->blendFunc(sfactor, GraphicsContext3D::ONE_MINUS_SRC_ALPHA));
> +    }

Enabling/disabling alpha is already done by the drawQuad routine above because all quads need that commonly, so no need to do that here.  Can you also make sure blendFunc gets reset properly, since it only is currently set at the beginning of the frame?

> Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp:695
> +    if (!quad->hasAlpha())
> +        context()->enable(GraphicsContext3D::BLEND);

Not needed either for the above reason.

> Source/WebCore/platform/graphics/chromium/cc/CCDrawQuad.h:53
> +    const IntSize& bounds() const { return m_sharedQuadState->bounds(); }

I don't think this function needs to be added to either CCDrawQuad or the shared quad state.  Isn't bounds() just quad->quadRect().size()?

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