aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTime.cpp
Commit message (Collapse)AuthorAge
* eliminate SK_BUILD_FOR_WIN32Gravatar Mike Klein2018-01-26
| | | | | | | | | | SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing. Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007 Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561 Reviewed-on: https://skia-review.googlesource.com/99340 Reviewed-by: Mike Reed <reed@google.com>
* skirt std::chrono on MSAN buildsGravatar Mike Klein2017-04-14
| | | | | | | | | | | | | | | I don't know why, but only std::chrono's calls to clock_gettime() seem to be affected by this MSAN bug. Other calls into libc++ that call libc, like std::to_string(int) calling snprintf, work fine. CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN BUG=skia:6504 Change-Id: I73fbe8793d2b5b5cca46ed68fb078a77d8748127 Reviewed-on: https://skia-review.googlesource.com/13502 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* s/C++'s gmtime/POSIX's gmtime_r/Gravatar Hal Canary2016-11-02
| | | | | | | | | | | BUG=skia:5923 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4341 Change-Id: I258da9bfa98f16e1abdea0f18ae786f9df118a8e Reviewed-on: https://skia-review.googlesource.com/4341 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* Now we're on MSVC 2015, try using std::chrono for timing again.Gravatar mtklein2016-05-04
| | | | | | | | | | | | | 2015's std::chrono::high_resolution_clock should have a precision equal to our old custom code. Tested this locally on Windows 10 and Mac (the two affected platforms). Long term SkTime::GetNSecs() can probably be phased out for direct <chrono> use. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950173002 Review-Url: https://codereview.chromium.org/1950173002
* Minor mingw cross compilation fix.Gravatar cjacek2016-03-16
| | | | | | Windows.h is actually windows.h. Review URL: https://codereview.chromium.org/1804163005
* SkTime: Stop using POSIX entensions to time.h for timezoneGravatar halcanary2016-01-12
| | | | | | | | | | | | | | | | | | SkTime::GetDateTime() isn't used anywhere in production, so change it to return current UTC time, rather than local time. Also, move code into SkTime out of ports. A later CL will remove empty files. BUG=skia:4736 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562943002 [mtklein] Only deleting unused API. TBR=reed@google.com Review URL: https://codereview.chromium.org/1562943002
* Revert of SkTime updates (patchset #2 id:20001 of ↵Gravatar mtklein2015-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1521293002/ ) Reason for revert: linux Canary builder has no std::steady_clock. Weird... Original issue's description: > SkTime updates > > 1) Use steady_clock instead of high_resolution_clock. If we don't have a > guarantee of monotonicity, it's pretty much useless for timing things. > > 2) Implement Mac/iOS with <chrono> too. This was waiting on C++11 library support. > > Both high_resolution_clock and steady_clock are (still) busted on MSVC 2013, > so no change there. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/6a20871e5aeaa7e61f3348694bf436af16f824b9 TBR=herb@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1529603002
* SkTime updatesGravatar mtklein2015-12-14
| | | | | | | | | | | | | | 1) Use steady_clock instead of high_resolution_clock. If we don't have a guarantee of monotonicity, it's pretty much useless for timing things. 2) Implement Mac/iOS with <chrono> too. This was waiting on C++11 library support. Both high_resolution_clock and steady_clock are (still) busted on MSVC 2013, so no change there. BUG=skia: Review URL: https://codereview.chromium.org/1521293002
* SkTime::GetNSecs()Gravatar mtklein2015-10-23
| | | | | | | | | | | | | | | | | | | | | - Move high-precision wall timers from tools/timer to SkTime. - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). - Delete unused tools/timer code. I have no idea what's going on there in src/animator. I don't intend to investigate. BUG=skia: Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot Committed: https://skia.googlesource.com/skia/+/a1840d50e29fd95e4df2d1168fe54c34c2a5c30c Committed: https://skia.googlesource.com/skia/+/38a88e4c0c28a7be981aac7bb4a198ad95a62a63 Review URL: https://codereview.chromium.org/1422513003
* Revert of SkTime::GetNSecs() (patchset #11 id:200001 of ↵Gravatar mtklein2015-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1422513003/ ) Reason for revert: Times don't look like they make sense on Windows. Original issue's description: > SkTime::GetNSecs() > > - Move high-precision wall timers from tools/timer to SkTime. > - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). > - Delete unused tools/timer code. > > I have no idea what's going on there in src/animator. > I don't intend to investigate. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot > > Committed: https://skia.googlesource.com/skia/+/a1840d50e29fd95e4df2d1168fe54c34c2a5c30c > > Committed: https://skia.googlesource.com/skia/+/38a88e4c0c28a7be981aac7bb4a198ad95a62a63 TBR=caryclark@google.com,reed@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1422623003
* SkTime::GetNSecs()Gravatar mtklein2015-10-23
| | | | | | | | | | | | | | | | | | | - Move high-precision wall timers from tools/timer to SkTime. - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). - Delete unused tools/timer code. I have no idea what's going on there in src/animator. I don't intend to investigate. BUG=skia: Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot Committed: https://skia.googlesource.com/skia/+/a1840d50e29fd95e4df2d1168fe54c34c2a5c30c Review URL: https://codereview.chromium.org/1422513003
* Revert of SkTime::GetNSecs() (patchset #10 id:180001 of ↵Gravatar mtklein2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1422513003/ ) Reason for revert: https://codereview.chromium.org/1412453006 Original issue's description: > SkTime::GetNSecs() > > - Move high-precision wall timers from tools/timer to SkTime. > - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). > - Delete unused tools/timer code. > > I have no idea what's going on there in src/animator. > I don't intend to investigate. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 > > CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot > > Committed: https://skia.googlesource.com/skia/+/a1840d50e29fd95e4df2d1168fe54c34c2a5c30c TBR=caryclark@google.com,reed@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1417753003
* SkTime::GetNSecs()Gravatar mtklein2015-10-22
| | | | | | | | | | | | | | | | | - Move high-precision wall timers from tools/timer to SkTime. - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). - Delete unused tools/timer code. I have no idea what's going on there in src/animator. I don't intend to investigate. BUG=skia: Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot Review URL: https://codereview.chromium.org/1422513003
* Revert of SkTime::GetNSecs() (patchset #9 id:160001 of ↵Gravatar caryclark2015-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1422513003/ ) Reason for revert: broke chromeos Original issue's description: > SkTime::GetNSecs() > > - Move high-precision wall timers from tools/timer to SkTime. > - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). > - Delete unused tools/timer code. > > I have no idea what's going on there in src/animator. > I don't intend to investigate. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/70084cbc16ee8162649f2601377feb6e49de0217 TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1420923003
* SkTime::GetNSecs()Gravatar mtklein2015-10-22
| | | | | | | | | | | | | - Move high-precision wall timers from tools/timer to SkTime. - Implement SkTime::GetMSecs() in terms of SkTime::GetNSecs(). - Delete unused tools/timer code. I have no idea what's going on there in src/animator. I don't intend to investigate. BUG=skia: Review URL: https://codereview.chromium.org/1422513003
* Remove include of stdlib.h from SkTypes.h.Gravatar bungeman2015-08-26
| | | | | | | | | | | | | | | Unfortunately, immintrin.h (which is also included by SkTypes) includes xmmintrin.h which includes mm_malloc.h which includes stdlib.h for malloc even though, from the implementation, it is difficult to see why. Fortunately, arm_neon.h does not seem to be involved in such shenanigans, so building for Android will keep things sane. TBR=reed@google.com Doesn't change Skia API, just moves an include. Review URL: https://codereview.chromium.org/1313203003
* SkTime: return timezone information; format in ISO-8601Gravatar halcanary2015-05-01
Motivation: PDF/A metadata will need the creation date embedded in it. Also, GetDateTime returns local time in Win32. This now behaves the same as on Unix systems. BUG=skia:3110 Review URL: https://codereview.chromium.org/1109593002