aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorTable.h
Commit message (Collapse)AuthorAge
* Ensure that SkColorTable->fCount is set properly after decodesGravatar msarett2016-05-17
| | | | | | | | | | | | We now have some blits that will process the color table. If we erroneously report that the size of the color table is 256, we will do extra work and annoy MSAN. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1982753002 Review-Url: https://codereview.chromium.org/1982753002
* remove non-static uses of SkOncePtrGravatar mtklein2016-05-02
| | | | | | | | | | | | | | | | | | | | | | | Still slowly working through all the SK_DECLARE_STATIC_FOO macros. SkOncePtr is complicating things by having SkOncePtr delete its pointer and SkBaseOncePtr not. Simplify things by removing SkOncePtr, leaving only the leaky SkBaseOncePtr. We replace SkOncePtr<T> instead with SkOnce and T. In most cases this did not need to be a pointer, and in some cases here we're even saving a few bytes by replacing SkOncePtr<T> with SkOnce and a T. The dependency map of SK_DECLARE_STATIC_FOO is: SkBaseMutex -> SkBaseSemaphore -> SkBaseOncePtr They're intertwined enough that I think I've got to do all three in one next CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1939503002 Review-Url: https://codereview.chromium.org/1939503002
* use allocator (if present) when we allocate our cache bitmapGravatar reed2015-09-17
| | | | | | | | Remove some bogus tests on the cache, as they are not thread-reliable. Running w/ discardable these are racy. BUG=532981 Review URL: https://codereview.chromium.org/1351453004
* Specialize SkOncePtr<T[]>.Gravatar mtklein2015-09-09
| | | | | | | | | | | | | | SkOncePtr<T[]> is identical to SkOncePtr<T> except we'll default to delete[] for cleanup. CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot BUG=skia: No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1311893010
* Port uses of SkLazyPtr to SkOncePtr.Gravatar mtklein2015-09-09
| | | | | | | | | | | | | | | | This gives SkOncePtr a non-trivial destructor that uses std::default_delete by default. This is overrideable, as seen in SkColorTable. SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP. BUG=skia: No public API changes. TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/a1254acdb344174e761f5061c820559dab64a74c Review URL: https://codereview.chromium.org/1322933005
* Revert of Port uses of SkLazyPtr to SkOncePtr. (patchset #7 id:110001 of ↵Gravatar mtklein2015-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1322933005/ ) Reason for revert: Breaks Chrome roll. obj/skia/ext/skia_chrome.skia_memory_dump_provider.o does not have -I include/private on its include path, but transitively includes SkMessageBus.h. Original issue's description: > Port uses of SkLazyPtr to SkOncePtr. > > This gives SkOncePtr a non-trivial destructor that uses std::default_delete > by default. This is overrideable, as seen in SkColorTable. > > SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP. > > BUG=skia: > > No public API changes. > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/a1254acdb344174e761f5061c820559dab64a74c TBR=herb@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1334523002
* Port uses of SkLazyPtr to SkOncePtr.Gravatar mtklein2015-09-09
| | | | | | | | | | | | | | This gives SkOncePtr a non-trivial destructor that uses std::default_delete by default. This is overrideable, as seen in SkColorTable. SK_DECLARE_STATIC_ONCE_PTR still just leaves its pointers hanging at EOP. BUG=skia: No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1322933005
* change colortable to use factory for reinflating, check for emptyGravatar reed2015-08-28
| | | | | | BUG=525763 Review URL: https://codereview.chromium.org/1307023004
* remove SkInstCntGravatar mtklein2015-06-26
| | | | | | | | | | | | | | It's been outclassed by Valgrind and leak sanitizer, and it seems to be causing problems for external folks building Skia. I'm not sure why our own builds seem unaffected. Latest thread: https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0 BUG=skia: Review URL: https://codereview.chromium.org/1217573002
* Add comment describing SkColorTable constructor.Gravatar scroggo2015-03-18
| | | | Review URL: https://codereview.chromium.org/1011263002
* Flail a little against LLVM crash.Gravatar mtklein2014-12-02
| | | | | | | | | | Cannot reproduce this in my local Chromium checkout (using their Clang, just like the bots). BUG=skia: TBR=reed@google.com Review URL: https://codereview.chromium.org/764433003
* Make SkColorTable explicitly thread-safe.Gravatar mtklein2014-12-02
| | | | | | | | | Mostly this means using SkLazyPtr for the 16-bit cache. We can remove the copy constructor now and just ref it instead. BUG=skia: Review URL: https://codereview.chromium.org/769323002
* SkColorTable locking serves no purpose anymore.Gravatar mtklein2014-12-02
| | | | | | | | | The only thing the unlock methods were doing was assert their balance. This removes the unlock methods and renames the lock methods "read". BUG=skia: Review URL: https://codereview.chromium.org/719213008
* Add MultiPictureDraw to nanobenchGravatar robertphillips2014-11-21
| | | | | | | | | | I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. TBR=bsalomon@google.com Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe Review URL: https://codereview.chromium.org/731973005
* Revert of Add MultiPictureDraw to nanobench (patchset #7 id:120001 of ↵Gravatar robertphillips2014-11-21
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/731973005/) Reason for revert: Needs more work Original issue's description: > Add MultiPictureDraw to nanobench > > I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. > > TBR=bsalomon@google.com > > Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe TBR=mtklein@google.com,bsalomon@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/750583002
* Add MultiPictureDraw to nanobenchGravatar robertphillips2014-11-21
| | | | | | | | I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/731973005
* remove alphatype from colortableGravatar reed2014-09-29
| | | | | | | | | | | the owning bitmap is (already) responsible for knowing the alphatype BUG=skia: R=djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/611093002
* Expose SkColorTable classGravatar ch.dumez2014-08-05
| | | | | | | | | | | Expose SkColorTable class as it is used in SkBitmap::allocPixels(SkColorTable*) API, which is already exposed. R=reed@google.com, ben@chromium.org Author: ch.dumez@samsung.com Review URL: https://codereview.chromium.org/418173011
* Refactor read and write buffers.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer a step each in the hierarchy. What used to be this: SkFlattenableWriteBuffer -> SkOrderedWriteBuffer SkFlattenableReadBuffer -> SkOrderedReadBuffer SkFlattenableReadBuffer -> SkValidatingReadBuffer is now SkWriteBuffer SkReadBuffer -> SkValidatingReadBuffer Benefits: - code is simpler, names are less wordy - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed - write buffers are completely devirtualized, important for record speed This refactoring was mostly mechanical. You aren't going to find anything interesting in files with less than 10 lines changed. BUG=skia: R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/134163010 git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkImageInfo into its own headerGravatar reed@google.com2013-11-13
| | | | | | | | | BUG= R=djsollen@google.com Review URL: https://codereview.chromium.org/71813002 git-svn-id: http://skia.googlecode.com/svn/trunk@12273 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkColorTable from SkFlattenable hierarchy.Gravatar commit-bot@chromium.org2013-10-15
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/27392002 git-svn-id: http://skia.googlecode.com/svn/trunk@11791 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "change SkColorTable to be immutable""Gravatar reed@google.com2013-10-10
| | | | | | | | | | | | This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9. Fixed was call-sites in benches that used the (now gone) setIsOpaque api. R=scroggo@google.com Review URL: https://codereview.chromium.org/26572006 git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "change SkColorTable to be immutable"Gravatar reed@google.com2013-10-09
| | | | | | | | | | This reverts commit 1c0ff422868b3badf5ffe0790a5d051d1896e2f7. BUG= Review URL: https://codereview.chromium.org/26709002 git-svn-id: http://skia.googlecode.com/svn/trunk@11677 2bbb7eff-a529-9590-31e7-b0007b416f81
* change SkColorTable to be immutableGravatar reed@google.com2013-10-09
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/25353002 git-svn-id: http://skia.googlecode.com/svn/trunk@11676 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement multi-threaded picture playback via cloning.Gravatar djsollen@google.com2012-08-29
| | | | | | | | | | | | | | The CL adds SkPicture.clone() which produces a thread-safe copy by creating a shallow copy of the thread-safe data within the picture and a deep copy of the data that is not (e.g. SkPaint). This implementation re-flattens the paints when cloning instead of retaining the flattened paints from the recording process. Changes were also needed to various classes to ensure thread safety Review URL: https://codereview.appspot.com/6459105 git-svn-id: http://skia.googlecode.com/svn/trunk@5335 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added Inst counting to SkFlattenable-derived classesGravatar robertphillips@google.com2012-06-27
| | | | | | | | http://codereview.appspot.com/6355043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkColorTable into its own header and reduce includes in SkFlattenable.hGravatar djsollen@google.com2012-06-12
Review URL: https://codereview.appspot.com/6299072 git-svn-id: http://skia.googlecode.com/svn/trunk@4236 2bbb7eff-a529-9590-31e7-b0007b416f81