Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Issue 1634103003: Fix gfx::Canvas::DrawStringRectWithHalo (Closed)

Created:
4 years, 11 months ago by Lof
Modified:
4 years, 5 months ago
CC:
chromium-reviews, kalyank, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix gfx::Canvas::DrawStringRectWithHalo Crash fixed. DrawStringRectWithHalo is GPU-friendly now. BUG=581358, 546564 R=tomhudson,ericrk,sky,chrishtr TEST=PaintingWindowTest* Committed: https://crrev.com/a757877ee245399ff048cca891e1bf7a1700a58f Cr-Commit-Position: refs/heads/master@{#406374}

Patch Set 1 #

Total comments: 4

Patch Set 2 : pixel test #

Patch Set 3 : small fixes #

Patch Set 4 : Try to fix png loading #

Patch Set 5 : rewrite test #

Total comments: 4

Patch Set 6 : remarks #

Patch Set 7 : small fixes #

Patch Set 8 : remove rebaseline #

Patch Set 9 : try another font #

Patch Set 10 : more tolerant compare #

Patch Set 11 : robust test #

Patch Set 12 : check halo pixels #

Total comments: 2

Patch Set 13 : fix memory leak #

Patch Set 14 : fuzzy pixel tests #

Patch Set 15 : fix fuzzy comparator's params #

Total comments: 8

Patch Set 16 : fixes #

Total comments: 3

Patch Set 17 : for try jobs only #

Patch Set 18 : less tolerant compare #

Total comments: 2

Patch Set 19 : bots' baselines #

Total comments: 10

Patch Set 20 : small fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -77 lines) Patch
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +187 lines, -0 lines 0 comments Download
M ui/gfx/canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/canvas_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +7 lines, -77 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +7 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +7 lines, -0 lines 0 comments Download
A ui/gfx/test/data/compositor/string_faded.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
A ui/gfx/test/data/compositor/string_with_halo.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Binary file 0 comments Download
A ui/gfx/test/data/compositor/string_with_shadows.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download

Messages

Total messages: 62 (9 generated)
Lof
Hello! It is look like we haven't tests for OnPaint for slimming paint. I fixed ...
4 years, 11 months ago (2016-01-26 16:18:53 UTC) #1
sky
+danakj
4 years, 11 months ago (2016-01-26 18:12:34 UTC) #4
danakj
The bugs and the CL don't specify, what exactly was the crash?
4 years, 11 months ago (2016-01-26 19:19:42 UTC) #5
danakj
It's good to add tests, thanks, and it's great we're following [+senorblanco]'s advice and using ...
4 years, 11 months ago (2016-01-26 19:41:53 UTC) #7
Lof
On 2016/01/26 19:19:42, danakj wrote: > The bugs and the CL don't specify, what exactly ...
4 years, 11 months ago (2016-01-26 19:52:38 UTC) #8
danakj
On 2016/01/26 19:52:38, Lof wrote: > On 2016/01/26 19:19:42, danakj wrote: > > The bugs ...
4 years, 11 months ago (2016-01-26 19:54:31 UTC) #9
tomhudson
On 2016/01/26 19:54:31, danakj wrote: > What is the crash that happens exactly? Do you ...
4 years, 11 months ago (2016-01-26 20:11:36 UTC) #10
tomhudson
On 2016/01/26 20:11:36, tomhudson wrote: > DrawStringRectWithHalo() is one several parts of ui/gfx/ which assumes ...
4 years, 11 months ago (2016-01-26 20:15:24 UTC) #11
Lof
On 2016/01/26 19:41:53, danakj wrote: > "Snapshot test tests"? I see no Snapshot tests/classes in ...
4 years, 11 months ago (2016-01-26 20:22:48 UTC) #12
Lof
> What is the crash that happens exactly? Do you have a backtrace? Backtrace: S32A_Opaque_BlitRow32_SSE4 ...
4 years, 11 months ago (2016-01-26 20:27:08 UTC) #13
Lof
We can't to record display list when we use temporary SkBitmap https://code.google.com/p/chromium/codesearch#chromium/src/ui/gfx/canvas_skia.cc&l=289
4 years, 11 months ago (2016-01-26 20:30:16 UTC) #14
Lof
I rewrote to pixel test and fixed remarks. Now I try to write simple cc/playback ...
4 years, 11 months ago (2016-01-27 16:02:44 UTC) #15
Lof
I rewrote test again. It's look like ok. And tests were passed successfully! I am ...
4 years, 10 months ago (2016-01-28 15:45:41 UTC) #16
danakj
Thanks, doing this as a ui compositor test makes more sense, and looks much better. ...
4 years, 10 months ago (2016-01-28 19:30:39 UTC) #17
Lof
It looks like draw text + pixel test = bad test.
4 years, 10 months ago (2016-01-29 22:39:13 UTC) #18
danakj
On 2016/01/29 22:39:13, Lof wrote: > It looks like draw text + pixel test = ...
4 years, 10 months ago (2016-01-29 23:11:22 UTC) #19
Lof
Appearance of text is vary from one platform to another. And even on Windows there ...
4 years, 10 months ago (2016-01-30 20:22:49 UTC) #20
Lof
PTAL. I think this CL is important. I also reproduce original problem in simple test: ...
4 years, 10 months ago (2016-02-08 14:11:21 UTC) #22
tomhudson
On 2016/02/08 14:11:21, Lof wrote: > PTAL. I think this CL is important. I certainly ...
4 years, 10 months ago (2016-02-08 14:17:54 UTC) #23
Lof
On 2016/02/08 14:17:54, tomhudson wrote: > I certainly like the idea of changing Canvas::DrawStringRectWithHalo(); I ...
4 years, 10 months ago (2016-02-08 14:59:53 UTC) #24
Stephen White
https://codereview.chromium.org/1634103003/diff/220001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/1634103003/diff/220001/ui/gfx/render_text.cc#newcode278 ui/gfx/render_text.cc:278: paint_.setImageFilter(SkDilateImageFilter::Create(1, 1)); I think there's a memory leak here. ...
4 years, 10 months ago (2016-02-08 16:24:52 UTC) #26
Stephen White
https://codereview.chromium.org/1634103003/diff/220001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/1634103003/diff/220001/ui/gfx/render_text.cc#newcode278 ui/gfx/render_text.cc:278: paint_.setImageFilter(SkDilateImageFilter::Create(1, 1)); On 2016/02/08 16:24:51, Stephen White wrote: > ...
4 years, 10 months ago (2016-02-08 16:27:10 UTC) #27
Lof
On 2016/02/08 16:24:52, Stephen White wrote: > I think there's a memory leak here. You ...
4 years, 10 months ago (2016-02-08 21:16:13 UTC) #28
chrishtr
What's the status of this CL?
4 years, 7 months ago (2016-05-20 00:14:17 UTC) #29
Lof
On 2016/05/20 00:14:17, chrishtr wrote: > What's the status of this CL? Hello! Code works. ...
4 years, 7 months ago (2016-05-20 08:17:57 UTC) #30
danakj
On 2016/05/20 08:17:57, Lof wrote: > On 2016/05/20 00:14:17, chrishtr wrote: > > What's the ...
4 years, 7 months ago (2016-05-20 21:16:12 UTC) #31
danakj
Here's an example: https://code.google.com/p/chromium/codesearch#chromium/src/cc/trees/layer_tree_host_pixeltest_masks.cc&rcl=1463757523&l=424
4 years, 7 months ago (2016-05-20 21:16:49 UTC) #32
Lof
On 2016/05/20 21:16:12, danakj wrote: > For pixel tests with platform differences instead of cc::ExactPixelComparator ...
4 years, 7 months ago (2016-05-20 22:34:37 UTC) #33
Lof
I rewrote test. Try jobs succeeded.
4 years, 7 months ago (2016-05-23 07:49:57 UTC) #34
danakj
https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc#newcode118 ui/compositor/layer_unittest.cc:118: const base::string16 text = base::ASCIIToUTF16("Danakj"); lol how about "TEST" ...
4 years, 7 months ago (2016-05-23 19:42:55 UTC) #35
danakj
https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc#newcode96 ui/compositor/layer_unittest.cc:96: class DrawStringLayer : public Layer, public LayerDelegate { Why ...
4 years, 7 months ago (2016-05-23 19:44:02 UTC) #36
tomhudson
https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc#newcode1304 ui/compositor/layer_unittest.cc:1304: #if defined(OS_WIN) On 2016/05/23 19:42:55, danakj wrote: > Why ...
4 years, 7 months ago (2016-05-23 19:49:05 UTC) #37
Lof
On 2016/05/23 19:49:05, tomhudson wrote: > https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc > File ui/compositor/layer_unittest.cc (right): > > https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc#newcode1304 > ...
4 years, 7 months ago (2016-05-23 21:12:46 UTC) #38
Lof
https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/280001/ui/compositor/layer_unittest.cc#newcode96 ui/compositor/layer_unittest.cc:96: class DrawStringLayer : public Layer, public LayerDelegate { On ...
4 years, 7 months ago (2016-05-24 13:52:28 UTC) #39
danakj
https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc#newcode1329 ui/compositor/layer_unittest.cc:1329: float percentage_pixels_large_error = 50.0f; // Don't check. What do ...
4 years, 6 months ago (2016-06-01 18:45:47 UTC) #40
Lof
On 2016/06/01 18:45:47, danakj wrote: > https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc > File ui/compositor/layer_unittest.cc (right): > > https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc#newcode1329 > ...
4 years, 6 months ago (2016-06-01 21:17:34 UTC) #41
tomhudson
On 2016/06/01 21:17:34, Lof wrote: > That’s why we don’t have success story with pixel ...
4 years, 6 months ago (2016-06-06 15:38:32 UTC) #42
Stephen White
Another alternative is to use the Ahem font. It consists of four simple glyphs and ...
4 years, 6 months ago (2016-06-06 16:04:48 UTC) #43
danakj
https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc#newcode1329 ui/compositor/layer_unittest.cc:1329: float percentage_pixels_large_error = 50.0f; // Don't check. On 2016/06/01 ...
4 years, 6 months ago (2016-06-22 23:14:04 UTC) #44
danakj
On 2016/06/22 23:14:04, danakj wrote: > LGTM with a few more comments. (please get senorblanco ...
4 years, 6 months ago (2016-06-22 23:16:26 UTC) #45
danakj
On Mon, Jun 6, 2016 at 8:38 AM, <tomhudson@google.com> wrote: > On 2016/06/01 21:17:34, Lof ...
4 years, 6 months ago (2016-06-22 23:19:21 UTC) #46
tomhudson
On 2016/06/22 23:19:21, danakj wrote: > That'd be possible too, but then we have to ...
4 years, 6 months ago (2016-06-23 14:35:27 UTC) #47
Lof
On 2016/06/22 23:14:04, danakj wrote: > LGTM with a few more comments. > > https://codereview.chromium.org/1634103003/diff/300001/ui/compositor/layer_unittest.cc#newcode1333 ...
4 years, 6 months ago (2016-06-23 15:13:34 UTC) #48
danakj
Thanks! One last thought: it might make sense to use the baselines that the bots ...
4 years, 6 months ago (2016-06-23 18:43:28 UTC) #49
Lof
On 2016/06/23 18:43:28, danakj wrote: > .... Done!
4 years, 6 months ago (2016-06-23 21:07:40 UTC) #50
Stephen White
non-test parts LGTM, but sky@ (or some other gfx/ person) should probably take a look ...
4 years, 5 months ago (2016-07-11 14:46:45 UTC) #51
sky
just nits https://codereview.chromium.org/1634103003/diff/360001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/360001/ui/compositor/layer_unittest.cc#newcode96 ui/compositor/layer_unittest.cc:96: class DrawStringLayerDelegate: public LayerDelegate { Add description, ...
4 years, 5 months ago (2016-07-18 15:02:03 UTC) #52
Lof
https://codereview.chromium.org/1634103003/diff/360001/ui/compositor/layer_unittest.cc File ui/compositor/layer_unittest.cc (right): https://codereview.chromium.org/1634103003/diff/360001/ui/compositor/layer_unittest.cc#newcode96 ui/compositor/layer_unittest.cc:96: class DrawStringLayerDelegate: public LayerDelegate { On 2016/07/18 15:02:02, sky ...
4 years, 5 months ago (2016-07-19 14:34:38 UTC) #53
sky
LGTM
4 years, 5 months ago (2016-07-19 17:55:31 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1634103003/380001
4 years, 5 months ago (2016-07-19 19:34:26 UTC) #57
commit-bot: I haz the power
Committed patchset #20 (id:380001)
4 years, 5 months ago (2016-07-19 20:40:08 UTC) #59
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 20:40:39 UTC) #60
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 20:42:30 UTC) #62
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/a757877ee245399ff048cca891e1bf7a1700a58f
Cr-Commit-Position: refs/heads/master@{#406374}

Powered by Google App Engine
This is Rietveld 408576698