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

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed)

Created:
7 years, 3 months ago by mtklein
Modified:
7 years, 3 months ago
Reviewers:
scroggo, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Rewrite SkTRegistry to take any trivially-copyable type. Obviously these are all currently function pointers of type T(*)(P) for various T and P. In bench refactoring, I'm trying to register a function pointer of type T(*)(), which can't be done as is (passing P=void doesn't work). This also lets us register things like primitives, which is conceivable useful. BUG= R=reed@google.com, scroggo@google.com Committed: https://code.google.com/p/skia/source/detail?r=11082

Patch Set 1 #

Total comments: 11

Patch Set 2 : reed+scroggo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -66 lines) Patch
M bench/SkBenchmark.h View 1 chunk +1 line, -1 line 0 comments Download
M experimental/SkiaExamples/SkExample.h View 1 chunk +1 line, -1 line 0 comments Download
M gm/gm.h View 1 chunk +1 line, -1 line 0 comments Download
M gm/gm.cpp View 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkImageDecoder.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M include/core/SkImageEncoder.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M include/core/SkTRegistry.h View 1 3 chunks +6 lines, -7 lines 0 comments Download
M src/images/SkImageDecoder_FactoryDefault.cpp View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/images/SkImageDecoder_FactoryRegistrar.cpp View 1 2 chunks +4 lines, -10 lines 0 comments Download
M src/images/SkImageDecoder_libbmp.cpp View 1 3 chunks +2 lines, -3 lines 0 comments Download
M src/images/SkImageDecoder_libgif.cpp View 1 3 chunks +2 lines, -4 lines 0 comments Download
M src/images/SkImageDecoder_libico.cpp View 1 3 chunks +2 lines, -4 lines 0 comments Download
M src/images/SkImageDecoder_libjpeg.cpp View 1 2 chunks +3 lines, -5 lines 0 comments Download
M src/images/SkImageDecoder_libpng.cpp View 1 2 chunks +3 lines, -5 lines 0 comments Download
M src/images/SkImageDecoder_libwebp.cpp View 1 2 chunks +3 lines, -5 lines 0 comments Download
M src/images/SkImageDecoder_wbmp.cpp View 1 2 chunks +2 lines, -4 lines 0 comments Download
M src/images/SkImageEncoder_Factory.cpp View 1 1 chunk +2 lines, -7 lines 0 comments Download
M src/images/SkMovie_gif.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/ports/SkImageDecoder_CG.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ports/SkImageDecoder_WIC.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/Test.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
mtklein
7 years, 3 months ago (2013-09-04 15:04:57 UTC) #1
reed1
https://codereview.chromium.org/23453031/diff/1/include/core/SkTRegistry.h File include/core/SkTRegistry.h (right): https://codereview.chromium.org/23453031/diff/1/include/core/SkTRegistry.h#newcode22 include/core/SkTRegistry.h:22: explicit SkTRegistry(T data) { (const T&) so we don't ...
7 years, 3 months ago (2013-09-04 15:15:23 UTC) #2
reed1
adding scroggo for ImageDecoder question
7 years, 3 months ago (2013-09-04 15:15:43 UTC) #3
scroggo
Minor concerns about clarity, but the code looks good. https://codereview.chromium.org/23453031/diff/1/bench/benchmain.cpp File bench/benchmain.cpp (right): https://codereview.chromium.org/23453031/diff/1/bench/benchmain.cpp#newcode88 bench/benchmain.cpp:88: ...
7 years, 3 months ago (2013-09-04 15:40:21 UTC) #4
mtklein
Take another look? I added the typedefs. Now let's see if they compile everywhere... https://codereview.chromium.org/23453031/diff/1/bench/benchmain.cpp ...
7 years, 3 months ago (2013-09-04 16:36:45 UTC) #5
scroggo
lgtm
7 years, 3 months ago (2013-09-04 17:15:38 UTC) #6
reed1
lgtm
7 years, 3 months ago (2013-09-04 17:16:15 UTC) #7
mtklein
7 years, 3 months ago (2013-09-04 17:20:38 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 manually as r11082 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698