Commit Graph

30 Commits

Author SHA1 Message Date
reed
e8f3062a36 switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1817383002
2016-03-23 18:59:25 -07:00
reed
ca2622ba05 return pictures as sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002

Review URL: https://codereview.chromium.org/1811703002
2016-03-18 07:25:55 -07:00
reed
9ce9d6772d update callsites for Make image factories
not forced yet, as we still have the build-guard. waiting on chrome CL

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003

TBR=

Review URL: https://codereview.chromium.org/1810813003
2016-03-17 10:51:11 -07:00
aleksandar.stojiljkovic
07e2692da3 SkResourceCache::GetAllocator() index8 and other color types handling
Unit tests added to check all color types in SkOneShotDiscardablePixelref

SkResourceCacheTest seems to have been allways using default Heap Allocator.
 Fixed so that it uses private (not global that is) SkDiscardableMemory.

BUG=skia:4355

Review URL: https://codereview.chromium.org/1426753006
2015-11-10 04:55:15 -08:00
halcanary
6950de6c41 Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
2015-11-07 05:29:00 -08:00
fmalita
3b0d532df7 Purge cached resources on SkImage destruction.
BUG=532981
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1352883004
2015-09-18 08:07:31 -07:00
reed
2ed7d50307 remove racy tests, as they assume the cache can't be purged behind their back
If I explicitly purge the resource-cache after every DM, these tests fail (sporadically)
.
BUG=skia:

Review URL: https://codereview.chromium.org/1350143002
2015-09-17 13:27:44 -07:00
reed
98ed7b6d01 create SkBitmapProvider to abstract images and bitmaps
BUG=skia:

Review URL: https://codereview.chromium.org/1340223003
2015-09-15 12:38:12 -07:00
reed
99138876a6 simplify bitmap scaler and cache
BUG=skia:

Review URL: https://codereview.chromium.org/1320513005
2015-08-31 15:16:17 -07:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
reed
93a1215fe0 SkPaint::FilterLevel -> SkFilterQuality
clone (+rebase) of https://codereview.chromium.org/1009183002/

BUG=skia:
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/1014533004
2015-03-16 10:08:34 -07:00
reed
83787d0ff0 only notify bitmaps that have been added to the cache
old code:
- calls=2677 hit-rate=3.51139%

new code:
- calls=94 hit-rate=97.8723%

BUG=skia:

Review URL: https://codereview.chromium.org/960563002
2015-02-25 07:17:11 -08:00
reed
7eeba25877 Notify resource caches when pixelref genID goes stale
patch from issue 954443002 at patchset 40001 (http://crrev.com/954443002#ps40001)

BUG=skia:

Review URL: https://codereview.chromium.org/950363002
2015-02-24 13:54:23 -08:00
mtklein
90c6bc4e85 Revert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001 of https://codereview.chromium.org/825263005/)
Reason for revert:
Crazy failures.

http://build.chromium.org/p/client.skia/builders/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/builds/1428/steps/dm/logs/stdio

Original issue's description:
> notify resource caches when pixelref genID goes stale
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4675819b9dbb3ad71ec851776e5de26d342f29fe

TBR=bsalomon@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/936423002
2015-02-19 08:53:52 -08:00
reed
4675819b9d notify resource caches when pixelref genID goes stale
BUG=skia:

Review URL: https://codereview.chromium.org/825263005
2015-02-19 08:22:54 -08:00
yunchao.he
90acb8e97c a typo in SkResourceCacheTest
BUG=skia:

Review URL: https://codereview.chromium.org/868613002
2015-01-23 17:06:21 -08:00
reed
3054be16df Remove canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)

BUG=skia:
TBR=
re-landing after chrome fixes have landed

Review URL: https://codereview.chromium.org/784223007
2014-12-10 07:24:28 -08:00
reed
a8918a0650 Revert of remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul (patchset #3 id:40001 of https://codereview.chromium.org/790733003/)
Reason for revert:
need to update chrome first

Original issue's description:
> remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
>
> patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2c1605a1fbaa2e35a27399a34254fb1200ec2ae6

TBR=fmalita@google.com,fmalita@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/791763002
2014-12-09 13:55:20 -08:00
reed
2c1605a1fb remove (dumb) canvas::NewRaster, and rename surface::NewRasterPMColor to N32Premul
patch from issue 781403002 at patchset 20001 (http://crrev.com/781403002#ps20001)

BUG=skia:

Review URL: https://codereview.chromium.org/790733003
2014-12-09 12:33:38 -08:00
reed
9d93c2ebb3 Add SkCachedData and use it for SkMipMap
This reverts commit 37c5a815d8.

TBR=mtklein

Review URL: https://codereview.chromium.org/635333002
2014-10-08 05:17:12 -07:00
reed
37c5a815d8 Speculative revert to diagnose crash in chrome. Revert "Add SkCachedData and use it for SkMipMap"
This reverts commit 92561a0b99.

crasher in question:
https://code.google.com/p/chromium/issues/detail?id=420178

Review URL: https://codereview.chromium.org/617613003
2014-10-03 13:23:31 -07:00
reed
92561a0b99 Add SkCachedData and use it for SkMipMap
Review URL: https://codereview.chromium.org/592843003
2014-10-02 13:47:08 -07:00
reed
30ad5306be allow SkBitmapCache to operate on a local instance, for testability
BUG=skia:
R=mtklein@google.com, danakj@chromium.org, piotaixr@chromium.org, junov@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/576763002
2014-09-16 10:39:55 -07:00
danakj
790ffe3feb Make SkBitmapCache remove invalid bitmaps from the SkResourceCache.
This adds SkResourceCache::Remove() which will remove a resource from
its cache. The resource is required to be unlocked at the time Remove()
is called.

Then SkBitmapCache::Find() makes use of this to Remove() bitmaps from
the cache whose pixels have been evicted. This allows the bitmap to be
re-added to the cache with pixels again.

After this change, background a tab (and discarding all the bitmaps'
contents) no longer disables image caching for those discarded images
once the tab is visible again.

BUG=skia:2926
NOTRY=true
R=reed@android.com, tomhudson@google.com, reed@google.com

Author: danakj@chromium.org

Review URL: https://codereview.chromium.org/561953002
2014-09-11 10:49:52 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
mtklein
26abcf10a4 disable flaky test
BUG=skia:2912
R=reed@google.com, mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/537363003
2014-09-04 10:50:55 -07:00
piotaixr
42b0dfeb29 The key for SkBitmapCache can now be genID+SkIRect
BUG=skia:2894
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/518983002
2014-09-03 11:33:13 -07:00
reed
848250415e make allocPixels throw on failure
BUG=skia:
R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/510423005
2014-09-02 12:50:45 -07:00
piotaixr
aca21d6d2f Rename ScaledImageCache.cpp to SkResourceCacheTest.cpp
BUG=skia:
R=junov@chromium.org, reed@android.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/518213003
2014-09-02 11:51:00 -07:00