aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
Commit message (Collapse)AuthorAge
...
* Port SkRefCnt.h to new SkAtomics.hGravatar mtklein2015-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds sk_memory_barrier(), implemented using sk_atomic_fetch_add() on an uninitialized variable. If that becomes a problem we can drop this to the porting layer, using std::atomic_thread_fence() / __atomic_thread_fence() / __sync_synchronize(). The big win is that ref() doesn't generate a memory barrier any more on ARM. This is an instance of SkSafeRef() in SkPaint(const SkPaint&) after this CL: 4d0: 684a ldr r2, [r1, #4] 4d2: 6018 str r0, [r3, #0] 4d4: b13a cbz r2, 4e6 <_ZN7SkPaintC1ERKS_+0x2e> 4d6: 1d10 adds r0, r2, #4 4d8: e850 4f00 ldrex r4, [r0] 4dc: 3401 adds r4, #1 4de: e840 4500 strex r5, r4, [r0] 4e2: 2d00 cmp r5, #0 4e4: d1f8 bne.n 4d8 <_ZN7SkPaintC1ERKS_+0x20> Here's the before, pretty much the same with two memory barriers surrounding the ref(): 4d8: 684a ldr r2, [r1, #4] 4da: 6018 str r0, [r3, #0] 4dc: b15a cbz r2, 4f6 <_ZN7SkPaintC1ERKS_+0x3e> 4de: 1d10 adds r0, r2, #4 4e0: f3bf 8f5f dmb sy 4e4: e850 4f00 ldrex r4, [r0] 4e8: 3401 adds r4, #1 4ea: e840 4500 strex r5, r4, [r0] 4ee: 2d00 cmp r5, #0 4f0: d1f8 bne.n 4e4 <_ZN7SkPaintC1ERKS_+0x2c> 4f2: f3bf 8f5f dmb sy The miscellaneous files in here are just fixups to explicitly include SkMutex.h, instead of leeching it off SkRefCnt.h. No public API changes. TBR=reed@google.com Build trybots seem hosed. NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/896803002
* Fix the speeling of "purgeable" in Gr codeGravatar bsalomon2015-01-23
| | | | | | TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/874693002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* add ImageGenerator::NewFromData to porting layerGravatar reed2015-01-07
| | | | | | BUG=skia:3275 Review URL: https://codereview.chromium.org/834633006
* change API contract: disallow zero-sized images or surfacesGravatar reed2014-12-31
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/830033003
* Add `SkIRect bounds()` convenience method to SkImageInfo and SkBitmap.Gravatar halcanary2014-10-24
| | | | Review URL: https://codereview.chromium.org/646213003
* Require SK_DECLARE_STATIC_LAZY_PTR is used in global scope.Gravatar mtklein2014-10-13
| | | | | | | | | | | | | Function- or method- local scope isn't threadsafe; the pointer is generally zero-initialized on first use in function scope (i.e. lazily... we have to go deeper), but for globals we can be pretty sure the linker will do that for us. BUG=skia: No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/651723003
* remove obsolete code for SK_SUPPORT_LEGACY_IMAGEGENERATORAPIGravatar reed2014-09-30
| | | | | | | | | BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/613933002
* Add support for the Rec601 YUV color space to GrYUVtoRGBEffect.Gravatar rileya2014-09-12
| | | | | | | | R=bsalomon@google.com, senorblanco@chromium.org, sugoi@chromium.org, reed@google.com Author: rileya@chromium.org Review URL: https://codereview.chromium.org/516463005
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Remove SkBitmapCache::Find/Add(_,width,height,_)Gravatar piotaixr2014-09-03
| | | | | | | | | | | in favor of the versions having a SkIRect as input parameter BUG=skia:2909 R=reed@google.com, junov@chromium.org Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/539643002
* Hide fields in SkImageInfoGravatar reed2014-09-03
| | | | | | | | | R=rmistry@google.com TBR=bsalomon Author: reed@google.com Review URL: https://codereview.chromium.org/536003002
* make allocPixels throw on failureGravatar reed2014-09-02
| | | | | | | | | BUG=skia: R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/510423005
* harden requirements on SkBitmapCacheGravatar reed2014-08-29
| | | | | | | | | BUG=skia: R=humper@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/521433002
* use possible corrected info when creating pixelrefGravatar reed2014-08-29
| | | | | | | | TBR=halcanary, scroggo Author: reed@google.com Review URL: https://codereview.chromium.org/518103002
* retool image cache to be generic cache, allowing the client to subclass ↵Gravatar reed2014-08-26
| | | | | | | | | | | | | | | "Rec", so they can provide a custom Key and arbitrary Value. Follow-on CLs - rename ScaledimageCache to something like GeneralCache - explore if we can use call-backs or some mechanism to completely hide "lock/unlock", by forcing all clients to support "copying" their value out of the cache as the result of a Find. R=mtklein@google.com, senorblanco@google.com, bsalomon@google.com, qiankun.miao@intel.com, senorblanco@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/507483002
* remove SkPurgeGlobalDiscardableMemoryPoolGravatar halcanary2014-08-25
| | | | | | | | | BUG=skia:2721 R=reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/495453004
* expose generalized imagecache keyGravatar reed2014-08-21
| | | | | | | | | BUG=skia: R=mtklein@google.com, halcanary@google.com, qiankun.miao@intel.com Author: reed@google.com Review URL: https://codereview.chromium.org/483493003
* Revert of Memory improvements to render_pdfs; better DM pool size defaults ↵Gravatar halcanary2014-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/433063002/) Reason for revert: breaking android tests Original issue's description: > Memory improvements to render_pdfs; better DM pool size defaults > > Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to > skia_resource_cache_mb_limit, if that value is >0 (true for some > low-memory Android devices). > > render_pdfs test program uses lazy decoding (and the discardable > memory pool). > > BUG=skia:2743 > > Committed: https://skia.googlesource.com/skia/+/66058b614d9c8cb63c24b1c779dd1a9a80752217 R=djsollen@google.com, mtklein@google.com TBR=djsollen@google.com, mtklein@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2743 Author: halcanary@google.com Review URL: https://codereview.chromium.org/418173012
* Memory improvements to render_pdfs; better DM pool size defaultsGravatar halcanary2014-08-01
| | | | | | | | | | | | | | | | Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to skia_resource_cache_mb_limit, if that value is >0 (true for some low-memory Android devices). render_pdfs test program uses lazy decoding (and the discardable memory pool). BUG=skia:2743 R=djsollen@google.com, mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/433063002
* SkDiscardablePixelRef returns correct indexed color on relock.Gravatar halcanary2014-07-28
| | | | | | | | R=djsollen@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/428603002
* Skia side RGB to YUV gpu conversionGravatar sugoi2014-07-21
| | | | | | | | | | | This code is the one that's currently working in my local chromium build. A few things still need to be addressed and I'll highlight these directly in the code. BUG=skia: R=reed@google.com, bsalomon@google.com, senorblanco@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com, halcanary@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/374743003
* remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE codeGravatar reed2014-07-14
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/387313004
* change pixelref to not inherit from SkFlattenableGravatar reed2014-07-07
| | | | | | | | | | If I can "inline" MallocPixelRef unflatten, then I think we can delete this code. The only caller today should be unflattening in the legacy path for bitmaps. R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/320873003
* Fix no previous prototype for function errorGravatar halcanary2014-07-02
| | | | | | | | | BUG=skia:2720 R=scroggo@google.com, caryclark@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/363983002
* add rowbytes option to allocPixelsGravatar reed2014-06-28
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/345263005
* Use new SkBaseMutex::assertHeld() in DiscardableMemoryPoolGravatar halcanary2014-06-11
| | | | | | | | R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/324413003
* Port most uses of SkOnce to SkLazyPtr.Gravatar mtklein2014-06-02
| | | | | | | | | | | | | | BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=15006 Committed: http://code.google.com/p/skia/source/detail?r=15014 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/304383005
* Revert of Port most uses of SkOnce to SkLazyPtr. ↵Gravatar commit-bot@chromium.org2014-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304383005/) Reason for revert: linux x86-64 release segfault in src/ports/SkFontHost_fontconfig.cpp:107 http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release/builds/905/steps/RunTests/logs/stdio Original issue's description: > Port most uses of SkOnce to SkLazyPtr. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=15006 > > Committed: http://code.google.com/p/skia/source/detail?r=15014 R=reed@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/306063004 git-svn-id: http://skia.googlecode.com/svn/trunk@15015 2bbb7eff-a529-9590-31e7-b0007b416f81
* Port most uses of SkOnce to SkLazyPtr.Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=15006 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/304383005 git-svn-id: http://skia.googlecode.com/svn/trunk@15014 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Port most uses of SkOnce to SkLazyPtr. ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304383005/) Reason for revert: Leaking refs on SkTypeface on Macs. Original issue's description: > Port most uses of SkOnce to SkLazyPtr. > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=15006 R=reed@google.com, mtklein@chromium.org TBR=mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: mtklein@google.com Review URL: https://codereview.chromium.org/304283007 git-svn-id: http://skia.googlecode.com/svn/trunk@15009 2bbb7eff-a529-9590-31e7-b0007b416f81
* Port most uses of SkOnce to SkLazyPtr.Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/304383005 git-svn-id: http://skia.googlecode.com/svn/trunk@15006 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of setConfig -> setInfo ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | (https://codereview.chromium.org/308683005/)" This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke all Windows bots Original issue's description: > setConfig -> setInfo > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14978 R=robertphillips@google.com, reed@google.com TBR=reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: epoger@google.com Review URL: https://codereview.chromium.org/302053002 git-svn-id: http://skia.googlecode.com/svn/trunk@14979 2bbb7eff-a529-9590-31e7-b0007b416f81
* setConfig -> setInfoGravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/308683005 git-svn-id: http://skia.googlecode.com/svn/trunk@14978 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix bug in legacy code for SK_SUPPORT_LEGACY_IMAGEGENERATORAPIGravatar reed@google.com2014-05-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14967 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of add colortable support to imagegenerator ↵Gravatar commit-bot@chromium.org2014-05-29
| | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304443003/)" Fix is to add colortable param to installPixels() This reverts commit 924205aaf2e0c3c65dda13e0eaccde3e7b2a5c40. BUG=skia: R=scroggo@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/300263005 git-svn-id: http://skia.googlecode.com/svn/trunk@14958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkPurgeGlobalDiscardableMemoryPool, needed to replace SkImageRefGravatar commit-bot@chromium.org2014-05-28
| | | | | | | | | | | BUG=skia:2389 R=reed@google.com, scroggo@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/298423002 git-svn-id: http://skia.googlecode.com/svn/trunk@14925 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of add colortable support to imagegenerator ↵Gravatar commit-bot@chromium.org2014-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/304443003/) Reason for revert: failing tests Original issue's description: > add colortable support to imagegenerator > > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=14916 R=halcanary@google.com, scroggo@google.com TBR=halcanary@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/300873007 git-svn-id: http://skia.googlecode.com/svn/trunk@14917 2bbb7eff-a529-9590-31e7-b0007b416f81
* add colortable support to imagegeneratorGravatar commit-bot@chromium.org2014-05-28
| | | | | | | | | | | BUG=skia: R=halcanary@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/304443003 git-svn-id: http://skia.googlecode.com/svn/trunk@14916 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-05-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14912 2bbb7eff-a529-9590-31e7-b0007b416f81
* hide discardable factory from public imagegenerator apiGravatar commit-bot@chromium.org2014-05-27
| | | | | | | | | | | BUG=skia: R=halcanary@google.com, scroggo@google.com, djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/295243006 git-svn-id: http://skia.googlecode.com/svn/trunk@14889 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkDiscardableMemoryPool to abstract classGravatar commit-bot@chromium.org2014-04-04
| | | | | | | | | | | | Motivation - we want to keep our public headers small. R=scroggo@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/223403012 git-svn-id: http://skia.googlecode.com/svn/trunk@14063 2bbb7eff-a529-9590-31e7-b0007b416f81
* Purge SkPurgeableMemoryBlock.Gravatar commit-bot@chromium.org2014-04-01
| | | | | | | | | | | | It was an experiment that is no longer used. R=mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/219133004 git-svn-id: http://skia.googlecode.com/svn/trunk@14020 2bbb7eff-a529-9590-31e7-b0007b416f81
* use colortype instead of configGravatar reed@google.com2014-02-20
| | | | | | | | | | | patch from issue 172063004 BUG=skia: R=scroggo@google.com Review URL: https://codereview.chromium.org/173893002 git-svn-id: http://skia.googlecode.com/svn/trunk@13520 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* add installPixelsGravatar reed@google.com2014-01-24
| | | | | | | | | BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/143073008 git-svn-id: http://skia.googlecode.com/svn/trunk@13174 2bbb7eff-a529-9590-31e7-b0007b416f81
* Resolve a few memory leaks in tests.Gravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | | | | | | | Purge the global scaled image cache after use in tests. The cache was right to hold on to the pixels indefinitely, but this change makes it easier to run down actual memory leaks. Add SK_DECLARE_INST_COUNT to several classes. BUG=skia: R=reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/145443004 git-svn-id: http://skia.googlecode.com/svn/trunk@13171 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/132643007/Gravatar commit-bot@chromium.org2014-01-13
| | | | | | | | | | | | | | | Reason for revert: broken tests TBR= NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/134843008 git-svn-id: http://skia.googlecode.com/svn/trunk@13058 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/129423002/"Gravatar reed@google.com2014-01-13
| | | | | | | | | | | | fixed new api references in unit tests This reverts commit ffc0058e1fbcbd69617e1f41b2dce5b5765ff99e. BUG= Review URL: https://codereview.chromium.org/132643007 git-svn-id: http://skia.googlecode.com/svn/trunk@13057 2bbb7eff-a529-9590-31e7-b0007b416f81