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

Issue 1411283005: Start making all .cpp files compile-able on all platforms. (Closed)

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

Description

Start making all .cpp files compile-able on all platforms. I sometimes dream to hone our build process down to something as simple as $ find src -name '*.cpp' | xargs c++ <some cflags> -c -o skia.o To start, it helps if we can compile all files on all platforms. Each non-portable file guards itself with defines provided by SkTypes.h. This does not convert all non-portable code, but it's a good representative chunk. E.g. instead of having to remember which SkDebug_*.cpp to compile on which platform we can just compile all three and let the code itself sort it out. This has the nice side effect of making non-portable code declare the conditions under which it can compile explicitly. I've been testing mostly with the CMake build as it's easiest, but this should apply equally to BUILD, Gyp, and GN files... to any build system really. BUG=skia:4269 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot Committed: https://skia.googlesource.com/skia/+/1ee76510f5dbf632d30975fc3509ef4f609156d2

Patch Set 1 #

Patch Set 2 : more windows, android and mac #

Patch Set 3 : fix #

Patch Set 4 : exclude #

Patch Set 5 : conditional on expat #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -56 lines) Patch
M cmake/CMakeLists.txt View 1 2 3 4 4 chunks +9 lines, -18 lines 0 comments Download
M src/device/xps/SkXPSDevice.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M src/doc/SkDocument_XPS.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/doc/SkDocument_XPS_None.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/gpu/gl/mac/SkCreatePlatformGLContext_mac.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkDebug_android.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
D src/ports/SkDebug_nacl.cpp View 1 chunk +0 lines, -38 lines 0 comments Download
M src/ports/SkDebug_stdio.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M src/ports/SkDebug_win.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M src/ports/SkFontHost_mac.cpp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/ports/SkFontHost_win.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_android.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_android_factory.cpp View 1 2 chunks +4 lines, -0 lines 1 comment Download
M src/ports/SkFontMgr_android_parser.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_win_dw.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_win_dw_factory.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_win_gdi_factory.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M src/ports/SkImageDecoder_CG.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/ports/SkImageDecoder_WIC.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkOSFile_win.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/ports/SkOSLibrary_posix.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkOSLibrary_win.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/ports/SkRemotableFontMgr_win_dw.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M src/ports/SkScalerContext_win_dw.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkTLS_win.cpp View 2 chunks +4 lines, -0 lines 0 comments Download
M src/ports/SkTime_win.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M src/ports/SkTypeface_win_dw.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M src/utils/SkThreadUtils_win.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M src/utils/mac/SkCreateCGImageRef.cpp View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/utils/mac/SkStream_mac.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/utils/win/SkAutoCoInitialize.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download
M src/utils/win/SkDWrite.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/utils/win/SkDWriteFontFileStream.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/utils/win/SkDWriteGeometrySink.cpp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/utils/win/SkHRESULT.cpp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/utils/win/SkIStream.cpp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/utils/win/SkWGL_win.cpp View 1 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (15 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/1411283005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/1
5 years, 1 month ago (2015-11-01 22:19:18 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-01 22:30:27 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411283005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/20001
5 years, 1 month ago (2015-11-01 22:54:07 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/3920)
5 years, 1 month ago (2015-11-01 22:54:55 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411283005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/40001
5 years, 1 month ago (2015-11-01 23:00:48 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot/builds/16)
5 years, 1 month ago (2015-11-01 23:05:34 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411283005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/60001
5 years, 1 month ago (2015-11-01 23:15:48 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411283005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/80001
5 years, 1 month ago (2015-11-01 23:18:20 UTC) #18
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-01 23:29:27 UTC) #20
mtklein_C
What do you think about something like this?
5 years, 1 month ago (2015-11-02 17:47:03 UTC) #22
reed1
lgtm brian, you fine with this pattern?
5 years, 1 month ago (2015-11-02 17:48:13 UTC) #24
bsalomon
On 2015/11/02 17:48:13, reed1 wrote: > lgtm > > brian, you fine with this pattern? ...
5 years, 1 month ago (2015-11-02 18:19:01 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411283005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411283005/80001
5 years, 1 month ago (2015-11-02 18:19:40 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://skia.googlesource.com/skia/+/1ee76510f5dbf632d30975fc3509ef4f609156d2
5 years, 1 month ago (2015-11-02 18:20:30 UTC) #28
bungeman-skia
5 years ago (2015-11-24 16:48:15 UTC) #30
Message was sent while issue was closed.
https://codereview.chromium.org/1411283005/diff/80001/src/ports/SkFontMgr_and...
File src/ports/SkFontMgr_android_factory.cpp (right):

https://codereview.chromium.org/1411283005/diff/80001/src/ports/SkFontMgr_and...
src/ports/SkFontMgr_android_factory.cpp:8: #if defined(SK_BUILD_FOR_ANDROID)
This and the associated header and factory should also be portable. There's
nothing Android specific about this file.

Powered by Google App Engine
This is Rietveld 408576698