aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScaledImageCache.cpp
Commit message (Collapse)AuthorAge
* Replace scaled bitmap if entry already exist in cache.Gravatar commit-bot@chromium.org2014-03-05
| | | | | | | | | | | BUG=skia:2251 R=reed@google.com Author: reveman@chromium.org Review URL: https://codereview.chromium.org/185263009 git-svn-id: http://skia.googlecode.com/svn/trunk@13667 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
* SkOnce: add option to call another cleanup function once at exit.Gravatar commit-bot@chromium.org2014-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use this to clean up empty SkData and SkPathRef. Current leaks: Leaked SkRefCntBase: 40 Leaked SkFlattenable: 32 Leaked SkPixelRef: 32 Leaked SkMallocPixelRef: 32 Leaked SkFontConfigInterface: 1 Leaked SkWeakRefCnt: 1 Leaked SkTypeface: 1 Leaked SkFontMgr: 1 Leaked SkDataTable: 3 Leaked SkImage: 1 Leaked ???: 1 Leaked ???: 1 BUG=skia: R=halcanary@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/132803005 git-svn-id: http://skia.googlecode.com/svn/trunk@13180 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
* use some helper Make functions to initialize SkImageInfoGravatar commit-bot@chromium.org2014-01-15
| | | | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/137993012 git-svn-id: http://skia.googlecode.com/svn/trunk@13081 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
* Revert of https://codereview.chromium.org/129423002/Gravatar commit-bot@chromium.org2014-01-13
| | | | | | | | | | | | | | | | Reason for revert: broke tests (compile) R=scroggo@google.com, halcanary@google.com TBR=halcanary@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/137133003 git-svn-id: http://skia.googlecode.com/svn/trunk@13056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkBitmap::installPixelRef()Gravatar reed@google.com2014-01-13
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/129423002 git-svn-id: http://skia.googlecode.com/svn/trunk@13055 2bbb7eff-a529-9590-31e7-b0007b416f81
* change offset to xy for pixelref subsettingGravatar reed@google.com2014-01-08
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/105893012 git-svn-id: http://skia.googlecode.com/svn/trunk@12958 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "Revert "Revert of https://codereview.chromium.org/110593003/"""Gravatar reed@google.com2014-01-06
| | | | | | | | | | This reverts commit aaa89649590323fe40f52439d9a9a3376bb3b8ae. BUG= Review URL: https://codereview.chromium.org/123223007 git-svn-id: http://skia.googlecode.com/svn/trunk@12910 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "Revert of https://codereview.chromium.org/110593003/""Gravatar reed@google.com2014-01-06
| | | | | | | | | | This reverts commit 0fef787f33aa38109a0c8427e0098d997efdd5ff. failed in chrome: https://codereview.chromium.org/124503002/ Review URL: https://codereview.chromium.org/105523008 git-svn-id: http://skia.googlecode.com/svn/trunk@12906 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/110593003/"Gravatar reed@google.com2014-01-03
| | | | | | | | | | | | This reverts commit c7abb25b25ba8b97948371d2bf0a2e3e78468f73. and fixes the ashmem break BUG= Review URL: https://codereview.chromium.org/119753010 git-svn-id: http://skia.googlecode.com/svn/trunk@12887 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/110593003/Gravatar commit-bot@chromium.org2014-01-03
| | | | | | | | | | | | | | | | Reason for revert: SkImageRef_ashmem doesn't compile R=halcanary@google.com, scroggo@google.com TBR=halcanary@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/119753009 git-svn-id: http://skia.googlecode.com/svn/trunk@12884 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add onNewLockPixels, that returns rowbytes and relies on info in pixelrefGravatar reed@google.com2014-01-03
| | | | | | | | | | | This reverts commit 890a6ec633c1f54891104a072a8964b4c2c81af9. BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/110593003 git-svn-id: http://skia.googlecode.com/svn/trunk@12883 2bbb7eff-a529-9590-31e7-b0007b416f81
* Address memory leak in SkScaledImageCacheGravatar robertphillips@google.com2013-12-18
| | | | | | | | https://codereview.chromium.org/107443009/ git-svn-id: http://skia.googlecode.com/svn/trunk@12749 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/112783004/"Gravatar reed@google.com2013-12-13
| | | | | | | | | | | | | This reverts commit 3293fe57a7507541e9040eab880dcd82c43881f4. Conflicts: src/core/SkScaledImageCache.cpp BUG= Review URL: https://codereview.chromium.org/108613005 git-svn-id: http://skia.googlecode.com/svn/trunk@12663 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect if the scaledimagecache returns a purged bitmapGravatar reed@google.com2013-12-12
| | | | | | | | | BUG= R=scroggo@google.com Review URL: https://codereview.chromium.org/110383005 git-svn-id: http://skia.googlecode.com/svn/trunk@12654 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/112783004/Gravatar commit-bot@chromium.org2013-12-12
| | | | | | | | | | | | | | | Reason for revert: Failing assert on Android R=scroggo@google.com, halcanary@google.com, reed@google.com, rmistry@google.com TBR=halcanary@google.com, reed@google.com, scroggo@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/93673005 git-svn-id: http://skia.googlecode.com/svn/trunk@12646 2bbb7eff-a529-9590-31e7-b0007b416f81
* ensure that we call onUnlock only when we onLock succeededGravatar reed@google.com2013-12-12
| | | | | | | | | BUG= R=halcanary@google.com, scroggo@google.com Review URL: https://codereview.chromium.org/112783004 git-svn-id: http://skia.googlecode.com/svn/trunk@12642 2bbb7eff-a529-9590-31e7-b0007b416f81
* add more tests for discardable cachesGravatar reed@google.com2013-12-11
| | | | | | | | | BUG= R=halcanary@google.com Review URL: https://codereview.chromium.org/112833003 git-svn-id: http://skia.googlecode.com/svn/trunk@12618 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12590 2bbb7eff-a529-9590-31e7-b0007b416f81
* support scaledimagecache instantiable using discardablememoryGravatar reed@google.com2013-12-09
| | | | | | | | | | | | Add this to your build/gyp system to use discardable instead of malloc+budget #define SK_USE_DISCARDABLE_SCALEDIMAGECACHE R=halcanary@google.com Review URL: https://codereview.chromium.org/105933003 git-svn-id: http://skia.googlecode.com/svn/trunk@12588 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkOnce: let f be any functor, update commentsGravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | | BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/104433005 git-svn-id: http://skia.googlecode.com/svn/trunk@12518 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12427Gravatar rmistry@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Trying to add the same scaled image twice shouldn't assert.Gravatar commit-bot@chromium.org2013-11-27
| | | | | | | | | | | | | This unbreaks bench_pictures --multi foo for me. BUG=skia:1868 R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/89293002 git-svn-id: http://skia.googlecode.com/svn/trunk@12422 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12013 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow SkLazyPixelRef to use SkScaledImageCacheGravatar commit-bot@chromium.org2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | - SkScaledImageCache: - Add new FindAndLock/AddAndLock variants that work well with SkLazyPixelRefs (take width, height, generation_id). - Add static versions of these new variants. - SkLazyPixelRef: - If NULL passed in as SkImageCache* in the constructor, it will now default to using the static SkScaledImageCache methods to cache decoded images. - If (fImageCache==NULL), the default allocator can be changed with the setAllocator method. If (fImageCache!=NULL), the SkImageCache handles allocation. - CachedDecodingPixelRefTest to test the new functionality. BUG= R=scroggo@google.com, mtklein@google.com, reed@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/37343002 git-svn-id: http://skia.googlecode.com/svn/trunk@12006 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkDivMod with a special case for ARM.Gravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | BUG=skia:1663 R=djsollen@google.com, tomhudson@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/24159009 git-svn-id: http://skia.googlecode.com/svn/trunk@11482 2bbb7eff-a529-9590-31e7-b0007b416f81
* revise SkTDynamicHash and add unit testsGravatar commit-bot@chromium.org2013-08-05
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/22292004 git-svn-id: http://skia.googlecode.com/svn/trunk@10552 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
* experimentally enable USE_HASH for scaledimagecacheGravatar reed@google.com2013-07-25
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/20378002 git-svn-id: http://skia.googlecode.com/svn/trunk@10363 2bbb7eff-a529-9590-31e7-b0007b416f81
* use dynamic hash to speed up scaledimagecacheGravatar reed@google.com2013-07-25
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/20344002 git-svn-id: http://skia.googlecode.com/svn/trunk@10362 2bbb7eff-a529-9590-31e7-b0007b416f81
* use namespace instead of static for template paramsGravatar reed@google.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10354 2bbb7eff-a529-9590-31e7-b0007b416f81
* experimental dynamic-hash (disabled)Gravatar reed@google.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10353 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10340 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SK_DECLARE_STATIC_MUTEXGravatar reed@google.com2013-07-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10309 2bbb7eff-a529-9590-31e7-b0007b416f81
* add mipmaps to scaledimagecacheGravatar reed@google.com2013-07-24
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/19789016 git-svn-id: http://skia.googlecode.com/svn/trunk@10305 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10299 2bbb7eff-a529-9590-31e7-b0007b416f81
* add scaledimagecacheGravatar reed@google.com2013-07-23
BUG= Review URL: https://codereview.chromium.org/20005003 git-svn-id: http://skia.googlecode.com/svn/trunk@10286 2bbb7eff-a529-9590-31e7-b0007b416f81