WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94400
[chromium] Random noise around text in FPS HUD
https://bugs.webkit.org/show_bug.cgi?id=94400
Summary
[chromium] Random noise around text in FPS HUD
Vangelis Kokkevis
Reported
2012-08-17 17:17:00 PDT
This is the result of an missing clear operation in the canvas used to store the text atlas.
Attachments
Patch
(1.52 KB, patch)
2012-08-17 17:26 PDT
,
Vangelis Kokkevis
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Vangelis Kokkevis
Comment 1
2012-08-17 17:26:41 PDT
Created
attachment 159240
[details]
Patch
James Robinson
Comment 2
2012-08-17 17:38:12 PDT
Comment on
attachment 159240
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=159240&action=review
> Source/WebCore/platform/graphics/chromium/CompositorHUDFontAtlas.cpp:68 > atlasContext.setFillColor(Color(0, 0, 0, 0), ColorSpaceDeviceRGB); > - atlasContext.fillRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE)); > + atlasContext.clearRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE));
how is clearRect() different from fillRect() with color(0, 0, 0, 0) ? do you still want to set the fill color when calling clearRect()?
Vangelis Kokkevis
Comment 3
2012-08-17 18:07:22 PDT
(In reply to
comment #2
)
> (From update of
attachment 159240
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=159240&action=review
> > > Source/WebCore/platform/graphics/chromium/CompositorHUDFontAtlas.cpp:68 > > atlasContext.setFillColor(Color(0, 0, 0, 0), ColorSpaceDeviceRGB); > > - atlasContext.fillRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE)); > > + atlasContext.clearRect(FloatRect(0, 0, ATLAS_SIZE, ATLAS_SIZE)); > > how is clearRect() different from fillRect() with color(0, 0, 0, 0) ?
The default transfer mode for GC is "source-over" (essentially a blend with whatever was in the background) which means with fillRect we're drawing a transparent rect over whatever was already there, which has no effect. clearRect sets the transfer mode to clear which does the job.
> > do you still want to set the fill color when calling clearRect()?
It's used by the Skia code when setting the paint, so I assume that yes, it's needed. Presumably you could clear to any color.
WebKit Review Bot
Comment 4
2012-08-17 19:07:14 PDT
Comment on
attachment 159240
[details]
Patch Clearing flags on attachment: 159240 Committed
r125961
: <
http://trac.webkit.org/changeset/125961
>
WebKit Review Bot
Comment 5
2012-08-17 19:07:17 PDT
All reviewed patches have been landed. Closing bug.
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