| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Compile include/ headers on their own In https://review.skia.org/1024156, we removed IWYU logic, but this also removed the ability for us to test compiling headers on their own (which other build systems do). This caused a missing #include to land in Skia but break upstream things [1]. By adding in the way to generate .cpp files for headers, this will allow us to catch that type of error. Unlike before, where there was a hand-curated list of headers, I did my best to include all public headers (and then those from select/core) which would have caught the previous error. If we like this, I can add other subdirectories to src to the list. I also did my best to avoid duplication of header files, so they are listed in one place and not two (e.g. 2 different BUILD.bazel rules) so it's hopefully easier to maintain. Change-Id: Ib5589c6ac06709d5a472bc7c524cc7a3b2a506b0 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1029376 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 10 个月前 | |
Move SkStringView from include/private/base into src/base src/base is where files that we want to be used in the base package (i.e. minimal deps and used in many parts of Skia) which are not used by the public API can go. Change-Id: Idf781f7cc24ab8aa05004c099cea53d65484b1c0 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/627696 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> | 3 年前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[config] Make SK_API configurable from SkUserConfig See also: http://go/crrv/c/4178712 Change-Id: I768c6672f3fb73361b219b6954ed409fe921d31c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/631901 Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Implement ASAN poisoning for TArray reserved capacity. Reading or writing past the end of a TArray's storage will now cause ASAN to immediately halt execution. This change dovetails with http://review.skia.org/842503, which rounded up STArray storage buffers to multiples of 8 bytes, because ASAN poisoning occurs at 8-byte granularities. For more information on ASAN's behavior with small ranges, see https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#mapping . Change-Id: I3681511d4f544b5d5f3e1d72837ea2b98fb0d7fb Bug: skia:40044929 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/842482 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
Make SkAlignTo templated; optimize SkAlignNonPow2 Updates several structs in Graphite to be consistent about using uint32_t for size/offset/alignment since they are post-validation types where we know that uint32_t is sufficient. This is needed so that the templated SkAlignTo and SkAlignNonPow2 can detect T correctly. Bug: b/263130762 Change-Id: I82aadf059304986d114ab439391b8400cdec6b1b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1064297 Reviewed-by: Nicolette Prevost <nicolettep@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> | 9 个月前 | |
[base] Move many files into base Moved from include/private into include/private/base: - SkAlignedStorage.h - SkContainers.h - SkFloatBits.h - SkPathEnums.h - SkTArray.h - SkTDArray.h - SkTypeTraits.h - SkVx.h - SkCPUTypes.h* Moved from include/core into include/private/base: - SkMath.h - SkSpan.h We still want SkSpan.h to be a part of the public API, so include/core/SkSpan.h still exists, it just includes include/private/base/SkSpan_impl.h We want to remove SkMath.h from the public API (most client uses have been removed already), but for now it too has a shim header file in include/core/SkMath.h As per the design of base, there are no includes inside of base on Skia files not also in base. SkLeftShift moved out of SkTypes.h and into SkMath.h, as that seemed like a better fit. U8CPU and U16CPU moved into their own file, SkCPUTypes.h while we decide where their future lies. Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: Icce0d0c445863c6908b63ec31b9595de400988dc Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/629317 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Reland "Reland "[graphite] Remove TextureInfoData and TextureSpec in TextureInfo"" This reverts commit cbc400181ddf1f73ad84532b1e868c62ffccf802. Reason for revert: fix ctor Original change's description: > Revert "Reland "[graphite] Remove TextureInfoData and TextureSpec in TextureInfo"" > > This reverts commit 2b944241704cbdee838fb73e4e9608dce0e44076. > > Reason for revert: compiler is thinking private template CTOR is > ambiguous. > > Original change's description: > > Reland "[graphite] Remove TextureInfoData and TextureSpec in TextureInfo" > > > > This reverts commit 4af764a24a7e2463c35fe681cc850a27baa3a697. > > > > Reason for revert: guard DawnTextureInfo change to class > > > > Original change's description: > > > Revert "[graphite] Remove TextureInfoData and TextureSpec in TextureInfo" > > > > > > This reverts commit 68be771f02f0c1b1a307fb6fafbcce003cb6d0fb. > > > > > > Reason for revert: must update forward declaration in chrome > > > > > > Original change's description: > > > > [graphite] Remove TextureInfoData and TextureSpec in TextureInfo > > > > > > > > The intermediates, TextureInfoData and its subclasses, and the backend > > > > structs [Foo]TextureSpec are removed. > > > > > > > > A private TextureInfo::Data virtual class is introduced that holds the > > > > sample count and mipmapped state, with the backend [Foo]TextureInfo > > > > classes extending. This exposes those fields and preserves their field > > > > layout before this CL, and also makes them equivalent to the removed > > > > TextureSpec structs. > > > > > > > > Since TextureInfo::Data is private to TextureInfo and can be friended, > > > > the virtual functionality that had been on TextureInfoData is declared > > > > up front to simplify the number of types that have to be implemented. > > > > > > > > In situations where there is a backend context (e.g. a Caps object) > > > > or calling a function from a backend-specific compilation unit, > > > > template traits are used instead of increasing the number of virtual > > > > functions. With a few more follow up CLs, the only virtual > > > > functionality on TextureInfo::Data will be related to equality and > > > > initialization/assignment operators. > > > > > > > > I opted to have the template functionality be part of the > > > > FooTextureInfo subclasses directly, instead of having a specialization > > > > for such as TextureInfoTraits<FooTextureInfo>. If it was that way, > > > > it would require all the callers/users of the templated functionality > > > > to include multiple headers and if the traits specialization wasn't > > > > included, the compiler error messages were pretty opaque. > > > > > > > > Lastly, this goes through all the backends and updates them to > > > > access their backend data directly using TextureInfoPriv::Get<T>, > > > > which just casts the underlying SkAnySubclass. > > > > > > > > > > > > Change-Id: I5f58146305175ca4da4d0feca5d8499cc850da35 > > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/952676 > > > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > > > > > Change-Id: I0c8a4962862af32bb720b56eb7f84e38ea901fe4 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/954836 > > > Owners-Override: Kaylee Lubick <kjlubick@google.com> > > > Reviewed-by: Kaylee Lubick <kjlubick@google.com> > > > Auto-Submit: Michael Ludwig <michaelludwig@google.com> > > > > Change-Id: I25c933a8de920f382987b4ea5b81a312f14f6631 > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/955836 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Reviewed-by: Kaylee Lubick <kjlubick@google.com> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com> > > Change-Id: Ieeaccfab7b04e5031ebafebb7505f074942ab80a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/956296 > Auto-Submit: Michael Ludwig <michaelludwig@google.com> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Change-Id: Ieb21cd985d96f077087f69174f408e9b3a08f144 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/956297 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Kaylee Lubick <kjlubick@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Add better version of SK_ASSUME for GCC >= 13 Change-Id: Ic0a64af12cc796144f7e83e2e0c8be2a5e13a748 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/797816 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Add SK_NO_SANITIZE_CFI that has effect when building with Clang Introduce a new SK_NO_SANITIZE_CFI macro, which expands to SK_NO_SANITIZE("cfi") with Clang, or to nothing otherwise. Clang supports CFI sanitization, and therefore the no_sanitize("cfi") function attribute works there as intended; but other compilers that do not support the feature may warn about the sanitizer name being unrecognized. For example, WebKit makes developer builds use -Werror, resulting in the following error when building with GCC: In file included from /app/webkit/WebKitBuild/GTK/Release/Skia/Headers/top/skia/core/SkCanvas.h:35, from /app/webkit/Source/WebKit/WebProcess/WebPage/gtk/WebPrintOperationGtk.h:40, from /app/webkit/Source/WebKit/WebProcess/WebPage/WebPage.h:84, from /app/webkit/Source/WebKit/NetworkProcess/Authentication/AuthenticationManager.cpp:38, from /app/webkit/WebKitBuild/GTK/Release/DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-4.cpp:2: /app/webkit/Source/ThirdParty/skia/include/private/base/SkTArray.h:621:33: error: ‘cfi’ attribute directive ignored [-Werror=attributes] 621 | static T* TCast(void* buffer) { | ^ cc1plus: all warnings being treated as errors This fix allows building with warnings-as-errors when using GCC. Change-Id: I5f13589535f479a545cad104b4bca065d7a36e42 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/930996 Reviewed-by: Ben Wagner <bungeman@google.com> Auto-Submit: Adrian Perez de Castro <aperez@igalia.com> Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
[base] Move many files into base Moved from include/private into include/private/base: - SkAlignedStorage.h - SkContainers.h - SkFloatBits.h - SkPathEnums.h - SkTArray.h - SkTDArray.h - SkTypeTraits.h - SkVx.h - SkCPUTypes.h* Moved from include/core into include/private/base: - SkMath.h - SkSpan.h We still want SkSpan.h to be a part of the public API, so include/core/SkSpan.h still exists, it just includes include/private/base/SkSpan_impl.h We want to remove SkMath.h from the public API (most client uses have been removed already), but for now it too has a shim header file in include/core/SkMath.h As per the design of base, there are no includes inside of base on Skia files not also in base. SkLeftShift moved out of SkTypes.h and into SkMath.h, as that seemed like a better fit. U8CPU and U16CPU moved into their own file, SkCPUTypes.h while we decide where their future lies. Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: Icce0d0c445863c6908b63ec31b9595de400988dc Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/629317 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Make SkAlignTo templated; optimize SkAlignNonPow2 Updates several structs in Graphite to be consistent about using uint32_t for size/offset/alignment since they are post-validation types where we know that uint32_t is sufficient. This is needed so that the templated SkAlignTo and SkAlignNonPow2 can detect T correctly. Bug: b/263130762 Change-Id: I82aadf059304986d114ab439391b8400cdec6b1b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1064297 Reviewed-by: Nicolette Prevost <nicolettep@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> | 9 个月前 | |
Allow SkUserConfig.h to override SkAttributes.h The header SkAttributes.h defines a number of attributes that Skia uses as C++ language extensions for various purposes. All of these attributes are only defined in SkAttributes.h if they are not already defined. Both the build and SkUserConfig.h should be allowed to define these attributes as the user sees fit (without first needing to undefine them). To allow SkUserConfig.h to define these attributes, move the include of SkAttributes.h to after the include of SkUserConfig.h in SkTypes.h. This restores the behavior proior to "[base] Split SkTypes.h logic out into smaller files" 8f5410688. While doing this, also pull the other attributes SK_PRINTF_LIKE and a new SK_NO_SANITIZE attibute into SkAttributes.h and document all of these in the "empty" SkUserConfig.h. Change-Id: I5c7167c58c1ffa58493d44fa8ba8ba8b1903d147 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630410 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 3 年前 | |
Fix numerous cases of casting away const Stop disabling cast-qual, to keep us honest. I tried to fix these correctly wherever I could. Many were easy. On a few I had to punt and const_cast, but now those serve as a reminder that we're doing something fishy -- which is the point of having an explicit name for that operation. By far the most sketchy thing here is in SkBlitter.cpp ... two blitters ignore the const on the aa and runs, then mutate them. I have no idea how that's safe. :shrug: Change-Id: I42e13a17c4631cd9b4d3f59dcf605a2295675339 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/780001 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Avoid usage of the clang::musttail attribute on ppc64le Use of clang::musttail attribute is not supported by Clang on ppc64le and needs avoided be removed in Skia. For more information, see: - https://github.com/llvm/llvm-project/pull/93267 - https://github.com/llvm/llvm-project/issues/98859 - https://github.com/llvm/llvm-project/issues/108014 Based on a patch originally by Dan Horák. Change-Id: Ib81146f375f9d00b0b364d9b5fd1c56a165e6d55 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/910216 Auto-Submit: Adrian Perez de Castro <aperez@igalia.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Florin Malita <fmalita@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Use SkSafe32 functions when adding/subtracting deltas. Avoid UBSAN integer overflow by clamping int32_t values. Bug: 380096845 Bug: 42536418 Change-Id: I64ed2281e5d11771db8f50c310425cd00e537bd2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/922858 Commit-Queue: Daniel Dilan <danieldilan@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Reland "Update clang_win and win_toolchain assets" The previous versions were fairly old (several years), and built from clang-15 and the VS 2019 headers/libs. The new versions are clang-18 and a tip-of-tree VS 2022. CL includes fixes for compiler bugs (bogus warnings, incorrect NaN handling, UBSAN issues in forward_list). Bug: b/311238827 Bug: b/338243739 Change-Id: I4da3f78eaee0c01a41793f4e1a08d895585bd864 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/851038 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> | 2 年前 | |
Annotate third_party imports See also http://cl/572542822 and http://cl/572540001 Some of these are not used in G3, but showed up in my search anyway, so might as well avoid future potential errors. Change-Id: I43711ee4c574e36a18f906f5f6d8aa72bde4a5db Bug: b/237076898 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/765256 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
Fix IWYU on some Ganesh ops headers Follow-up to http://review.skia.org/893677 which should fix the G3 build which attempts to build all our headers on their own (FillPathFlags.h did not due to a missing header). Change-Id: Iaa6d01e16fcff05d8cf7e5f0091aa9ce0651fce2 Bug: b/40044159 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/893739 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com> Auto-Submit: Kaylee Lubick <kjlubick@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com> | 1 年前 | |
Reland "Add sk_malloc_size() to query usable allocation sizes" This is a reland of commit 57f975e8e391d4174844dd4427224d477e213036 Original change's description: > Add sk_malloc_size() to query usable allocation sizes > > The implementation in SkContainers.cpp tries to use a platform-dependent > way of figuring out the actual size allocated for a memory block, but > when using a custom allocator it should not assume how to obtain this > information. Instead, add a sk_malloc_size() function that custom > allocators can implement. > > Existing code gets moved to SkMemory_{malloc,mozalloc}.cpp into their > respective sk_malloc_size() implementations. > > Change-Id: I4c8f23cbcc03ec9384104a7985a11df15584f583 > Bug: b/325991359 > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/816036 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Ben Wagner <bungeman@google.com> > Auto-Submit: Adrian Perez de Castro <aperez@igalia.com> Bug: b/325991359 Change-Id: I33d53e76907f348e4cf1405ea4fe8e9747e80313 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/817797 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 2 年前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Add presubmit rule to check for unuspported G3 APIs I didn't know about these and it caused a problem in http://review.skia.org/930127 that had to be reverted. Change-Id: Iac806234827ac69728dc66fee7cabf26fa561143 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/936444 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> | 1 年前 | |
Start removing SkNoncopyable. Just removing these a little at a time. Change-Id: Ieaed3dc84ca0f29f4fbda2176d92eb0df858390c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/647038 Auto-Submit: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> | 3 年前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Switch std::isfinite to SkIsFinite throughout Skia. On Windows (clang-cl), using std::isfinite appears to be slower than our old bit-manipulation code. This CL switches to SkIsFinite roughly everywhere (modulo SkSL and a few other low-level places) and replaces the SkIsFinite implementation with (x - x) == 0, which appears to generate great code in Clang. If metrics don't improve, we can go back to the bit masking approach again. Change-Id: I61dbf4545ef53031fe5ea492aa8c2f0a8c30c5cf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/842240 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> | 2 年前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Adapt remaining callers to be compatible with std::span After this lands, we need only test that our clients can build with the std::span alias, after which we can remove the flag. Change-Id: I80eb1c0356eea816865e51b2236b7b10b1dff1f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1104616 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Eric Boren <borenet@google.com> | 7 个月前 | |
Update (some) callers to follow more strict span rules - allows us to migrate to std::span, keeping SkSpan (for now) as an alias. - idea is to land call-site-cleanups separately, so that when we do try to actually throw the switch, that CL only contains the switch (build-flag) itself. Change-Id: I5f9aaafeb297b7adc1d953019fdac6ffda95fe03 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1097896 Commit-Queue: Mike Reed <mike@reedtribe.org> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Florin Malita <fmalita@google.com> | 7 个月前 | |
[graphite] Move KeyContext helpers to recorder Change-Id: Ibebb3a6f33092a388e834a2ad0cd4bc812f10135 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1057796 Commit-Queue: Thomas Smith <thomsmit@google.com> Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 8 个月前 | |
Remove __MSVC_RUNTIME_CHECKS support Support was added with "Add support for MSVC run-time checks (and control flow guard)" [0] and then mostly removed with "remove MSRTC bots and GN support" [1]. However, not all the support code was removed. Remove what lingers. In particular /RTCc is documented as "rejects code that conforms to the standard" and is now better covered by UBSAN's -fsanitize=implicit-*-truncation checks. [0] https://skia.googlesource.com/skia.git/+/50ea3c06b80f7322c64fd99926edcdd7ea398213 [1] https://skia.googlesource.com/skia.git/+/a2931beb4b0054a93ff5f86ab31d51ab7089f518 Change-Id: I09e63b89f9e46b88b22c01b9d159f0118c4cc5cf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/884161 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Ben Wagner <bungeman@google.com> | 1 年前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[base] Move more files into base Moved from include/private into include/private/base: - SkFloatingPoint.h - SkMacros.h - SkSafe32.h - SkTLogic.h - SkTPin.h - SkTemplates.h Moved from src/core into src/base: - SkDeque.cpp - SkFloatingPoint.cpp - SkTDArray.cpp - SkLeanWindows.h - SkMalloc.cpp - SkSafeMath.h - SkSemaphore.cpp - SkSafeMath.cpp* Some constants were moved from SkTypes.h into SkMath.h and the implementation of SkSafeMath was put into its own file (instead of being in SkMath.cpp) A shim was added for SkTemplates.h, due to a few uses lingering in Android. - frameworks/base/libs/hwui/SkiaCanvas.cpp - frameworks/base/libs/hwui/pipeline/skia/SkiaRecordingCanvas.cpp - frameworks/base/libs/hwui/jni/Graphics.cpp - vendor/...GIFDecode.cpp Client CLs: - http://ag/21017148 Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: If80cfac68fed4219c4ea144f428461d2426bed24 Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/630545 Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
Add [[nodiscard]] to various SkAuto* types Using these types without naming them creates a temporary that immediately goes out of scope, which is generally unexpected and not desirable. [[nodiscard]] means the compiler can generate a warning for this case, allowing presubmits to be simplified. Change-Id: Ifae7393700b41d04dbc4797d34ed66e20d6a0673 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1101396 Reviewed-by: Florin Malita <fmalita@google.com> Auto-Submit: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@google.com> | 7 个月前 | |
Use weak binding for blocking region functions Change-Id: I9d01203d9f3ac09a5b55c9384b740b0c062c497e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/784546 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> | 2 年前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[base] Move some files from include/private to include/private/base These ones were arbitrarily chosen among files that did not have any dependencies on include/core: include/private/SingleOwner.h include/private/SkDeque.h include/private/SkMalloc.h include/private/SkMutex.h include/private/SkOnce.h include/private/SkSemaphore.h include/private/SkStringView.h include/private/SkTFitsIn.h include/private/SkThreadAnnotations.h include/private/SkThreadID.h include/private/SkTo.h Change-Id: I32b945b459922e39e3e40c9f4af134b269d4958a Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/626078 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Herb Derby <herb@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 | |
[base] Move many files into base Moved from include/private into include/private/base: - SkAlignedStorage.h - SkContainers.h - SkFloatBits.h - SkPathEnums.h - SkTArray.h - SkTDArray.h - SkTypeTraits.h - SkVx.h - SkCPUTypes.h* Moved from include/core into include/private/base: - SkMath.h - SkSpan.h We still want SkSpan.h to be a part of the public API, so include/core/SkSpan.h still exists, it just includes include/private/base/SkSpan_impl.h We want to remove SkMath.h from the public API (most client uses have been removed already), but for now it too has a shim header file in include/core/SkMath.h As per the design of base, there are no includes inside of base on Skia files not also in base. SkLeftShift moved out of SkTypes.h and into SkMath.h, as that seemed like a better fit. U8CPU and U16CPU moved into their own file, SkCPUTypes.h while we decide where their future lies. Suggested review order: - include/private/base/BUILD.bazel - include/private/BUILD.bazel - include/BUILD.bazel - gn/*.gni (these are generated from the BUILD.bazel files) - BUILD.gn - public.bzl - Everything else, mostly done with find and replace and cleaned up with the rewrite_includes.py script. Change-Id: Icce0d0c445863c6908b63ec31b9595de400988dc Bug: skia:13983 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/629317 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Owners-Override: Kevin Lubick <kjlubick@google.com> | 3 年前 |
Files in "base" are used by many parts of Skia, but are not part of the public Skia API. See also src/base for other files that are part of base, but not needed by the public API.
Files here should not depend on anything other than system headers or other files in base.