WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46412
[CHROMIUM] <canvas> clearRect() doesn't respect active clipping region, when --enable-accelerated-2d-canvas is on
https://bugs.webkit.org/show_bug.cgi?id=46412
Summary
[CHROMIUM] <canvas> clearRect() doesn't respect active clipping region, when ...
Stephen White
Reported
2010-09-23 15:00:50 PDT
According to the spec, canvas's clearRect() should respect the active clipping region. Chrome with --enable-accelerated-2d-canvas doesn't. See layout test
http://philip.html5.org/tests/canvas/suite/tests/2d.clearRect.clip.html
.
Attachments
Patch
(3.65 KB, patch)
2010-09-24 06:49 PDT
,
Stephen White
no flags
Details
Formatted Diff
Diff
Patch
(3.34 KB, patch)
2010-09-27 06:45 PDT
,
Stephen White
jamesr
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Stephen White
Comment 1
2010-09-24 06:49:40 PDT
Created
attachment 68672
[details]
Patch
James Robinson
Comment 2
2010-09-24 14:59:57 PDT
Comment on
attachment 68672
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=68672&action=review
> WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:351 > + if (platformContext()->useGPU() && !platformContext()->canvasClipApplied()) { > platformContext()->prepareForHardwareDraw(); > platformContext()->gpuCanvas()->clearRect(rect); > return; > } > > + // Temporarily force the mode to "clear" to trigger a readback
I'd much prefer doing a syncSoftwareCanvas() here rather than depending on side effects of the Xfer mode being set to do the readback.
Stephen White
Comment 3
2010-09-27 06:45:59 PDT
Created
attachment 68903
[details]
Patch
Stephen White
Comment 4
2010-09-27 07:18:13 PDT
(In reply to
comment #2
)
> (From update of
attachment 68672
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=68672&action=review
> > > WebCore/platform/graphics/skia/GraphicsContextSkia.cpp:351 > > + if (platformContext()->useGPU() && !platformContext()->canvasClipApplied()) { > > platformContext()->prepareForHardwareDraw(); > > platformContext()->gpuCanvas()->clearRect(rect); > > return; > > } > > > > + // Temporarily force the mode to "clear" to trigger a readback > > I'd much prefer doing a syncSoftwareCanvas() here rather than depending on side effects of the Xfer mode being set to do the readback.
Good idea. Done.
James Robinson
Comment 5
2010-09-27 10:27:31 PDT
Comment on
attachment 68903
[details]
Patch R=me
Stephen White
Comment 6
2010-09-27 10:45:30 PDT
Committed
r68402
: <
http://trac.webkit.org/changeset/68402
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug