aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkOSFile_posix.cpp
Commit message (Collapse)AuthorAge
* trim #include <new> from SkPostConfig.hGravatar Mike Klein2018-06-11
| | | | | | | Change-Id: I693ddcd4ade101ba4eb4102e03adce183aa1d672 Reviewed-on: https://skia-review.googlesource.com/133829 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix file loading from bundles on iOSGravatar Brian Osman2018-01-16
| | | | | | | | Bug: skia: Change-Id: I9b9a7dcbdeb1630794b04d2a5a00d5f496aae85d Reviewed-on: https://skia-review.googlesource.com/94963 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Bundle resources and skps directories into iOS app.Gravatar Jim Van Verth2017-11-29
| | | | | | | | | | | | | Will bundle resources/ for viewer (and skps/ if that directory exists in the main Skia directory). Also updates file code on iOS to fall back to bundle directory. Docs-Preview: https://skia.org/?cl=76803 Bug: skia:7339 Change-Id: I244f67559c866451a6d02c3f1c4948d89457ec84 Reviewed-on: https://skia-review.googlesource.com/76803 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "sk_fgetsize to not use ftell."Gravatar Leon Scroggins2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit eefa289a214ea3917e5e00554f231adb5ad6f712. Reason for revert: Causing failures in BitmapFactoryTest. b/38233042 Original change's description: > sk_fgetsize to not use ftell. > > The previous version of sk_fgetsize used ftell and fseek to compute > the size of a file. There are so many issues with this that it is called > out by securecoding.cert.org as FIO19-C as a thing not to do. We already > have correct code for computing the size of a file in the mmap code, so > use that instead. > > Change-Id: I1d771124989d0ec1523f6d858814ee563263213a > Reviewed-on: https://skia-review.googlesource.com/9860 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Ben Wagner <bungeman@google.com> > TBR=bungeman@google.com,scroggo@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ie9392dde8747ae7c74ebfa00153705e316e841a2 Reviewed-on: https://skia-review.googlesource.com/17705 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* sk_fgetsize to not use ftell.Gravatar Ben Wagner2017-03-17
| | | | | | | | | | | | | The previous version of sk_fgetsize used ftell and fseek to compute the size of a file. There are so many issues with this that it is called out by securecoding.cert.org as FIO19-C as a thing not to do. We already have correct code for computing the size of a file in the mmap code, so use that instead. Change-Id: I1d771124989d0ec1523f6d858814ee563263213a Reviewed-on: https://skia-review.googlesource.com/9860 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix SkFILEStream.Gravatar Ben Wagner2017-03-10
| | | | | | | Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917 Reviewed-on: https://skia-review.googlesource.com/9498 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Eliminate SkFILE: it always is the same as FILE.Gravatar halcanary2015-11-20
| | | | Review URL: https://codereview.chromium.org/1467533003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Use static_assert instead of SK_COMPILE_ASSERT.Gravatar bungeman2015-08-20
| | | | | | | Now that static_assert is allowed, there is no need to use a non- standard compile time assertion Review URL: https://codereview.chromium.org/1306443004
* Clean up a few includes, introduce iwyu.Gravatar bungeman2015-07-29
| | | | | | | | | The current include-what-you-use with current clang is much less noisy and more useful than it has been in the past. This change introduces a few IWYU directives (which are helpful documentation for humans as well) and fixes a few sets of includes. Review URL: https://codereview.chromium.org/1207893002
* Move SkOSFile::Iter impls into ports.Gravatar bungeman2015-02-12
| | | | | | | This was one large ifdef in SkOSFile.cpp in utils. This moves the code to existing ports files. Review URL: https://codereview.chromium.org/920593002
* Add file access modes to sk_exists.Gravatar bungeman2014-07-10
| | | | | | | | | | | | Both Windows and Posix 'access' calls take a mode parameter which, in addition to checking existence, checks access modes. This change exposes this functionality. R=mtklein@google.com, reed@google.com Author: bungeman@google.com Review URL: https://codereview.chromium.org/384903002
* R=mtklein@google.comGravatar bungeman@google.com2013-07-12
| | | | | | Review URL: https://codereview.chromium.org/18503009 git-svn-id: http://skia.googlecode.com/svn/trunk@10050 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-06-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9423 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkData::NewFromFD.Gravatar bungeman@google.com2013-06-03
| | | | | | | | | | | Chromium needs a SkStream backed by a file descriptor. Skia already has the code and can do the work, this change exposes the functionality in Skia in a clean way. https://codereview.chromium.org/15941025/ git-svn-id: http://skia.googlecode.com/svn/trunk@9408 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkStream.Gravatar bungeman@google.com2013-05-29
https://codereview.chromium.org/15298009/ git-svn-id: http://skia.googlecode.com/svn/trunk@9312 2bbb7eff-a529-9590-31e7-b0007b416f81