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

Issue 646213002: Eliminate one copy of replace_char() function. (Closed)

Created:
6 years, 2 months ago by tfarina
Modified:
6 years ago
CC:
reviews_skia.org, bsalomon
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Eliminate one copy of replace_char() function. Instead of duplicating it in skimage_main.cpp, reuse the utility function we have already in picture_utils.h. BUG=skia:2651 TEST=./gyp_skia && ninja -C out/Debug dm $ out/Debug/dm --tests --gms=false -m String_Replace R=reed@google.com

Patch Set 1 #

Total comments: 1

Patch Set 2 : finish #

Patch Set 3 : test #

Patch Set 4 : add more tests #

Patch Set 5 : add another test with some weird characters #

Total comments: 1

Patch Set 6 : separate test case - plus use equals #

Patch Set 7 : str #

Patch Set 8 : more tests #

Patch Set 9 : tests tests tests #

Patch Set 10 : bad... #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -50 lines) Patch
M gyp/tools.gyp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkString.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkString.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -0 lines 1 comment Download
M tests/StringTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 2 comments Download
M tools/PictureRenderer.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tools/picture_utils.h View 1 1 chunk +0 lines, -9 lines 0 comments Download
M tools/picture_utils.cpp View 1 1 chunk +0 lines, -11 lines 0 comments Download
M tools/render_pictures_main.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M tools/skimage_main.cpp View 1 2 3 4 5 2 chunks +2 lines, -20 lines 0 comments Download
M tools/skpdiff/SkDiffContext.cpp View 1 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
tfarina
ptal.
6 years, 2 months ago (2014-10-11 21:11:23 UTC) #1
tfarina
Ping?
6 years, 2 months ago (2014-10-14 14:05:05 UTC) #2
tfarina
Robert, could you review this to me? Thanks,
6 years, 2 months ago (2014-10-15 14:01:21 UTC) #4
reed1
https://codereview.chromium.org/646213002/diff/1/tools/picture_utils.h File tools/picture_utils.h (left): https://codereview.chromium.org/646213002/diff/1/tools/picture_utils.h#oldcode30 tools/picture_utils.h:30: void replace_char(SkString* str, const char oldChar, const char newChar); ...
6 years, 2 months ago (2014-10-15 14:13:07 UTC) #6
robertphillips
I think we should skip this CL an move right to having this as a ...
6 years, 2 months ago (2014-10-15 14:13:24 UTC) #8
tfarina
On 2014/10/15 14:13:24, robertphillips wrote: > I think we should skip this CL an move ...
6 years, 2 months ago (2014-10-15 14:19:59 UTC) #9
reed1
On 2014/10/15 14:19:59, tfarina wrote: > On 2014/10/15 14:13:24, robertphillips wrote: > > I think ...
6 years, 2 months ago (2014-10-15 14:41:53 UTC) #10
tfarina
On 2014/10/15 14:41:53, reed1 wrote: > On 2014/10/15 14:19:59, tfarina wrote: > > On 2014/10/15 ...
6 years, 2 months ago (2014-10-15 14:45:16 UTC) #11
reed1
On 2014/10/15 14:45:16, tfarina wrote: > On 2014/10/15 14:41:53, reed1 wrote: > > On 2014/10/15 ...
6 years, 2 months ago (2014-10-15 14:46:44 UTC) #12
tfarina
Robert, Mike, could you please do another review? I will update the CL description soon. ...
6 years, 2 months ago (2014-10-15 20:49:28 UTC) #13
reed1
Can you add a test that exercises this new public API? I suggest you test ...
6 years, 2 months ago (2014-10-15 20:55:18 UTC) #15
tfarina
On 2014/10/15 20:55:18, reed1 wrote: > Can you add a test that exercises this new ...
6 years, 2 months ago (2014-10-15 21:29:09 UTC) #16
tfarina
ptal! https://codereview.chromium.org/646213002/diff/120001/tests/StringTest.cpp File tests/StringTest.cpp (right): https://codereview.chromium.org/646213002/diff/120001/tests/StringTest.cpp#newcode197 tests/StringTest.cpp:197: SkString hangul("\xed\x95\x9c\xea\xb5\xad\xec\x96\xb4"); Mike, could you take another look? ...
6 years, 2 months ago (2014-10-18 03:42:27 UTC) #17
reed1
unichars are single code-points, and can be up to 24bits (or so). SkString does not ...
6 years, 2 months ago (2014-10-20 12:34:49 UTC) #18
tfarina
On 2014/10/20 12:34:49, reed1 wrote: > unichars are single code-points, and can be up to ...
6 years, 2 months ago (2014-10-20 20:49:27 UTC) #19
reed1
On 2014/10/20 20:49:27, tfarina wrote: > On 2014/10/20 12:34:49, reed1 wrote: > > unichars are ...
6 years, 2 months ago (2014-10-20 21:08:27 UTC) #20
tfarina
Mike, please, see my comments below. Thanks! https://codereview.chromium.org/646213002/diff/240001/src/core/SkString.cpp File src/core/SkString.cpp (right): https://codereview.chromium.org/646213002/diff/240001/src/core/SkString.cpp#newcode633 src/core/SkString.cpp:633: size_t len ...
6 years, 1 month ago (2014-11-12 01:41:34 UTC) #22
mtklein
I am concerned this has fallen into over-engineering a solution to a non-problem. Let's not ...
6 years, 1 month ago (2014-11-12 02:37:32 UTC) #23
tfarina
mtklein, would you then accept my PATCH SET 1 - https://codereview.chromium.org/646213002/#ps1?
6 years, 1 month ago (2014-11-12 11:16:29 UTC) #24
reed1
https://codereview.chromium.org/646213002/diff/240001/tests/StringTest.cpp File tests/StringTest.cpp (right): https://codereview.chromium.org/646213002/diff/240001/tests/StringTest.cpp#newcode213 tests/StringTest.cpp:213: str.set("\xed\x95\x9c\xea\xb5\xad\xec\x96\xb4"); On 2014/11/12 01:41:34, tfarina wrote: > Could you ...
6 years, 1 month ago (2014-11-12 14:11:25 UTC) #25
scroggo
On 2014/11/12 14:11:25, reed1 wrote: > https://codereview.chromium.org/646213002/diff/240001/tests/StringTest.cpp > File tests/StringTest.cpp (right): > > https://codereview.chromium.org/646213002/diff/240001/tests/StringTest.cpp#newcode213 > ...
6 years ago (2014-12-15 20:34:50 UTC) #26
tfarina
6 years ago (2014-12-20 21:00:08 UTC) #27
OK. After
https://skia.googlesource.com/skia/+/9a0d6d6c88b87b3d0195e5633403325b6e922b8c
there is no more duplication.

Closing this!

Powered by Google App Engine
This is Rietveld 408576698