Bug 107372 - CanvasRenderingContext2D::drawTextInternal should create a mask buffer compatible with that of the canvas
Summary: CanvasRenderingContext2D::drawTextInternal should create a mask buffer compat...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
Depends on:
Reported: 2013-01-19 03:50 PST by Tim Horton
Modified: 2013-01-19 17:02 PST (History)
3 users (show)

See Also:

patch (1.90 KB, patch)
2013-01-19 03:53 PST, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Simon Fraser (smfr) 2013-01-19 11:04:20 PST
Comment on attachment 183618 [details]

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

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