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

Issue 319473003: Clean up Test's resourcePath code. (Closed)

Created:
6 years, 6 months ago by tfarina
Modified:
6 years, 6 months ago
Reviewers:
mtklein
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Clean up resourcePath code. 1) Make the implementation of SetResourcePath/GetResourcePath of GM and SkBenchmark match with the one in Test. 2) Make gResourcePath a static pointer to const char and move it inside the classes. BUG=None TEST=make tests && out/Debug/tests make gm && out/Debug/gm make bench && out/Debug/bench R=mtklein@google.com Committed: https://skia.googlesource.com/skia/+/52e4f413ffe2d281f9e90ff2147db08083ffcba7

Patch Set 1 #

Total comments: 6

Patch Set 2 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -25 lines) Patch
M bench/SkBenchmark.h View 1 2 chunks +3 lines, -4 lines 0 comments Download
M bench/SkBenchmark.cpp View 1 2 chunks +8 lines, -1 line 0 comments Download
M gm/copyTo4444.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M gm/etc1bitmap.cpp View 1 2 chunks +2 lines, -4 lines 0 comments Download
M gm/factory.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M gm/gm.h View 1 2 chunks +3 lines, -8 lines 0 comments Download
M gm/gm.cpp View 1 3 chunks +11 lines, -1 line 0 comments Download
M tests/Test.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tests/Test.cpp View 1 3 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
tfarina
Is this OK?
6 years, 6 months ago (2014-06-05 07:07:19 UTC) #1
mtklein
https://codereview.chromium.org/319473003/diff/1/tests/Test.h File tests/Test.h (right): https://codereview.chromium.org/319473003/diff/1/tests/Test.h#newcode65 tests/Test.h:65: static void SetResourcePath(const char* resourcePath) { I wouldn't bother ...
6 years, 6 months ago (2014-06-05 12:55:33 UTC) #2
tfarina
https://codereview.chromium.org/319473003/diff/1/tests/Test.h File tests/Test.h (right): https://codereview.chromium.org/319473003/diff/1/tests/Test.h#newcode65 tests/Test.h:65: static void SetResourcePath(const char* resourcePath) { On 2014/06/05 12:55:33, ...
6 years, 6 months ago (2014-06-06 01:53:10 UTC) #3
mtklein
lgtm
6 years, 6 months ago (2014-06-06 02:26:20 UTC) #4
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 6 months ago (2014-06-08 03:28:04 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/tfarina@chromium.org/319473003/20001
6 years, 6 months ago (2014-06-08 03:28:53 UTC) #6
commit-bot: I haz the power
Change committed as 52e4f413ffe2d281f9e90ff2147db08083ffcba7
6 years, 6 months ago (2014-06-08 03:50:49 UTC) #7
mtklein
6 years, 6 months ago (2014-06-08 14:02:03 UTC) #8
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/320733002/ by mtklein@google.com.

The reason for reverting is: Some benchmarks are written in a way that makes
this change unsafe (e.g. const char* resPath = GetResourcePath().c_str(); in
SkipZeroesBench) and Valgrind and ASAN caught that.  We can try again after a
more careful cleanup of GetResourcePath()..

Powered by Google App Engine
This is Rietveld 408576698