Bug 107372

Summary: CanvasRenderingContext2D::drawTextInternal should create a mask buffer compatible with that of the canvas
Product: WebKit Reporter: Tim Horton <thorton>
Component: CanvasAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: ojan.autocc, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch simon.fraser: review+

Description Tim Horton 2013-01-19 03:50:10 PST
CanvasRenderingContext2D::drawTextInternal forces use of an accelerated mask buffer if USE(IOSURFACE_CANVAS_BACKING_STORE) is on, but this is wrong, as we can decide (or be forced by a setting) to fall *out* of accelerated mode. We should instead check with the canvas and use GraphicsContext::createCompatibleBuffer.
Comment 1 Tim Horton 2013-01-19 03:53:02 PST
Created attachment 183618 [details]
patch
Comment 2 Simon Fraser (smfr) 2013-01-19 11:04:20 PST
Comment on attachment 183618 [details]
patch

That '1' is pretty mysterious.
Comment 3 Tim Horton 2013-01-19 16:58:19 PST
Comment on attachment 183618 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183618&action=review

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2299
> +        OwnPtr<ImageBuffer> maskImage = c->createCompatibleBuffer(maskRect.size(), 1);

I filed https://bugs.webkit.org/show_bug.cgi?id=107385 about that, but it also defaults to true so I'm gonna remove it from this line while landing.
Comment 4 Tim Horton 2013-01-19 17:02:10 PST
http://trac.webkit.org/changeset/140263