aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTLList.h
Commit message (Collapse)AuthorAge
* remove SkTCastGravatar Mike Klein2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SkTCast is functionally equivalent to reinterpret_cast. The comment about SkTCast helping to avoid strict alising issues is not true. Dereferencing a pointer cast to a pointer of an unrelated type is always undefined, even if smuggled through a union like in SkTCast. To really avoid aliasing issues, you need to make a union[1] of the two value types, or better, memcpy between values. I've had to fix MatrixText.cpp where switching to reinterpret_cast actually let Clang notice and warn that we're exploiting undefined behavior, and GrSwizzle.h and SkCamera.cpp caught by GCC. I've switched SkTLList over to use SkAlignedSTStorage, which seems to help convince some GCC versions that fObj is used in a sound way. [1] The union punning trick is non-standard in C++, but GCC and MSVC both explicitly support it. I believe Clang does not officially explicitly support it, but probably does quietly for GCC compatibility. Change-Id: I71822e82c962f9aaac8be24d3c0f39f4f8b05026 Reviewed-on: https://skia-review.googlesource.com/134947 Commit-Queue: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* 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>
* Change SkMemory to the more accurately named SkMalloc.Gravatar Herb Derby2017-03-27
| | | | | | | Change-Id: I6b08a74234b99bac866bad71014b94f7ec2d4bc8 Reviewed-on: https://skia-review.googlesource.com/10188 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make SkMemory.h and adjust all files for usage.Gravatar Herb Derby2017-03-20
| | | | | | | | | | | | This will be rolled out in three stages: 1) make SkMemory.h and have SkTypes.h include it. 2) Adjust chromium and android. 3) no long include SkMemory.h in SkTypes.h Change-Id: If360ef5e1164d88f50b03f279e2e963ca2f57d5d Reviewed-on: https://skia-review.googlesource.com/9874 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Delay initialization of free list in SkTLList until first use of listGravatar bsalomon2016-07-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138043002 Review-Url: https://codereview.chromium.org/2138043002
* Make SkTLList prealloc its first block of nodesGravatar bsalomon2015-11-18
| | | | Review URL: https://codereview.chromium.org/1458703005
* Make block size a template parameter of SkTLListGravatar bsalomon2015-11-18
| | | | Review URL: https://codereview.chromium.org/1457123002
* simplify insertion methods for SkTLListGravatar bsalomon2015-11-18
| | | | Review URL: https://codereview.chromium.org/1459663002
* SkTLList throw on sk_malloc failGravatar halcanary2015-09-21
| | | | | | BUG=530758 Review URL: https://codereview.chromium.org/1345373006
* 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
* Move SkTemplates.h to private.Gravatar bungeman2015-08-19
| | | | | | | | SkTemplates.h contains a number of Skia specific utilities which are not designed for external use. In addition to reducing the external support burden, this will allow Skia to freely refactor this file. Review URL: https://codereview.chromium.org/1272293004
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* SkNonCopyable should be used with private inheritance.Gravatar commit-bot@chromium.org2014-04-07
| | | | | | | | | | | | | | | This is mostly s/public SkNoncopyable/SkNoncopyable/g. Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor. I added SkNoncopyableVirtual to make them work as intended. Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/226183018 git-svn-id: http://skia.googlecode.com/svn/trunk@14081 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of Add getReducedClipStack to lua canvas ↵Gravatar bsalomon@google.com2014-02-26
| | | | | | | | | | | | (https://codereview.chromium.org/180283004/)" This reverts commit efded03a38d6147caaf2d951638d27fdd47eed64. Fixes builds Review URL: https://codereview.chromium.org/181903002 git-svn-id: http://skia.googlecode.com/svn/trunk@13599 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Add getReducedClipStack to lua canvas ↵Gravatar commit-bot@chromium.org2014-02-26
| | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/180283004/) Reason for revert: breaking a bunch of builds Original issue's description: > Add getReducedClipStack to lua canvas > > Committed: http://code.google.com/p/skia/source/detail?r=13594 R=reed@google.com TBR=reed@google.com NOTREECHECKS=true NOTRY=true Author: bsalomon@google.com Review URL: https://codereview.chromium.org/181653004 git-svn-id: http://skia.googlecode.com/svn/trunk@13597 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add getReducedClipStack to lua canvasGravatar commit-bot@chromium.org2014-02-26
| | | | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/180283004 git-svn-id: http://skia.googlecode.com/svn/trunk@13594 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add rect clip to convex_poly_clip GMGravatar commit-bot@chromium.org2014-02-04
| | | | | | | | | | | BUG=skia:2051 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/147793007 git-svn-id: http://skia.googlecode.com/svn/trunk@13300 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve handling of inverse clip paths in GrClipMaskManager.Gravatar bsalomon@google.com2012-12-07
| | | | | | | | | Will require rebaselining of complexclip_aa and complexclip_aa_layer on GPU. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6907052 git-svn-id: http://skia.googlecode.com/svn/trunk@6712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use ReduceClipStack in ClipMaskManager.Gravatar bsalomon@google.com2012-12-06
| | | | | | | | | R=robertphillips@google.com This will require some gpu rebaselining (complexclip_rect_aa, complexclip_aa, aaclip, simpleaaclip, complexclip_aa_layer)xy Review URL: https://codereview.appspot.com/6884051 git-svn-id: http://skia.googlecode.com/svn/trunk@6694 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add operator delete to match operator new for SkTLList.Gravatar bsalomon@google.com2012-12-05
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6871061 git-svn-id: http://skia.googlecode.com/svn/trunk@6673 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix stale iterators in LList test. Add newline to end of SkTLList.hGravatar bsalomon@google.com2012-12-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6663 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkClipStack::Iter use SkClipStack::Element.Gravatar bsalomon@google.com2012-12-04
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6871051 git-svn-id: http://skia.googlecode.com/svn/trunk@6661 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6660 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reland r6649 with fix for build errors.Gravatar bsalomon@google.com2012-12-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 6649 due to build breaks.Gravatar bsalomon@google.com2012-12-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6651 2bbb7eff-a529-9590-31e7-b0007b416f81
* Insert in middle of SkTInternalLList and SkTLList, in place cons for Gravatar bsalomon@google.com2012-12-03
| | | | | | | | | SkTLList. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6870050 git-svn-id: http://skia.googlecode.com/svn/trunk@6649 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkTLList, linked list class implemented on top of the internal llist class.Gravatar bsalomon@google.com2012-12-03
| | | | | | | | R=robertphillips@google.com Committed: https://code.google.com/p/skia/source/detail?r=6644 Review URL: https://codereview.appspot.com/6869049 git-svn-id: http://skia.googlecode.com/svn/trunk@6647 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert change accidentally committed.Gravatar bsalomon@google.com2012-12-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6645 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkTLList, linked list class implemented on top of the internal llist class.Gravatar bsalomon@google.com2012-12-03
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6869049 git-svn-id: http://skia.googlecode.com/svn/trunk@6644 2bbb7eff-a529-9590-31e7-b0007b416f81