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

Issue 1286093004: Refactor to put SkXfermode_opts inside SK_OPTS_NS. (Closed)

Created:
5 years, 4 months ago by mtklein_C
Modified:
5 years, 4 months ago
Reviewers:
djsollen, mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Refactor to put SkXfermode_opts inside SK_OPTS_NS. Without this refactor I was getting warnings previously about having code inside namespace SK_OPTS_NS (e.g. namespace sse2, namespace neon) referring to code inside an anonymous namespace (Sk4px, SkPMFloat, Sk4f, etc) [1]. That low-level code was in an anonymous namespace to allow multiple independent copies of its methods to be instantiated without the linker getting confused / offended about violating the One Definition Rule. This was only happening in Debug mode where the methods were not being inlined. To fix this all, I've force-inlined the methods of the low-level code and removed the anonymous namespace. BUG=skia:4117 [1] Here is what those errors looked like: In file included from ../../../../src/core/SkOpts.cpp:18:0: ../../../../src/opts/SkXfermode_opts.h:193:7: error: 'portable::Sk4pxXfermode' has a field 'portable::Sk4pxXfermode::fProc4' whose type uses the anonymous namespace [-Werror] class Sk4pxXfermode : public SkProcCoeffXfermode { ^ ../../../../src/opts/SkXfermode_opts.h:193:7: error: 'portable::Sk4pxXfermode' has a field 'portable::Sk4pxXfermode::fAAProc4' whose type uses the anonymous namespace [-Werror] ../../../../src/opts/SkXfermode_opts.h:235:7: error: 'portable::SkPMFloatXfermode' has a field 'portable::SkPMFloatXfermode::fProcF' whose type uses the anonymous namespace [-Werror] class SkPMFloatXfermode : public SkProcCoeffXfermode { ^ cc1plus: all warnings being treated as errors Committed: https://skia.googlesource.com/skia/+/b07bee3121680b53b98b780ac08d14d374dd4c6f

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -149 lines) Patch
M src/core/Sk4px.h View 2 chunks +0 lines, -9 lines 0 comments Download
M src/core/SkNx.h View 2 chunks +0 lines, -9 lines 0 comments Download
M src/core/SkOpts.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkPMFloat.h View 2 chunks +0 lines, -9 lines 0 comments Download
M src/opts/Sk4px_NEON.h View 5 chunks +27 lines, -29 lines 0 comments Download
M src/opts/Sk4px_SSE2.h View 6 chunks +33 lines, -31 lines 0 comments Download
M src/opts/Sk4px_none.h View 5 chunks +23 lines, -27 lines 0 comments Download
M src/opts/SkNx_neon.h View 2 chunks +0 lines, -4 lines 0 comments Download
M src/opts/SkNx_sse.h View 2 chunks +0 lines, -5 lines 0 comments Download
M src/opts/SkOpts_neon.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/opts/SkOpts_sse2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/opts/SkPMFloat_neon.h View 3 chunks +3 lines, -7 lines 0 comments Download
M src/opts/SkPMFloat_none.h View 3 chunks +3 lines, -7 lines 0 comments Download
M src/opts/SkPMFloat_sse.h View 3 chunks +3 lines, -7 lines 0 comments Download
M src/opts/SkXfermode_opts.h View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286093004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286093004/1
5 years, 4 months ago (2015-08-12 16:05:51 UTC) #2
mtklein_C
5 years, 4 months ago (2015-08-12 16:10:39 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-12 16:13:52 UTC) #6
djsollen
lgtm
5 years, 4 months ago (2015-08-12 17:21:23 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286093004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286093004/1
5 years, 4 months ago (2015-08-12 17:22:59 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/b07bee3121680b53b98b780ac08d14d374dd4c6f
5 years, 4 months ago (2015-08-12 17:23:41 UTC) #10
mtklein
5 years, 4 months ago (2015-08-12 18:56:25 UTC) #11
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/1284333002/ by mtklein@google.com.

The reason for reverting is: Maybe causing test / gold problems?.

Powered by Google App Engine
This is Rietveld 408576698