| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Rec in the cache is the owner of the pixel memory
- discardable or
- malloc
Each external client has a pixelref that just points to those pixels,
and whose destructor will notify the rec.
This eliminates the dependency on lockPixels in pixelref, freeing us
to remove that entirely from pixelref.
Bug: skia:
Change-Id: If45ed0ae202a1211336626364235215253e8aa7c
Reviewed-on: https://skia-review.googlesource.com/10300
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We'd like to fix bugs and make performance improvements to our hash tables. It's a lot easier if we can focus on one implementation, so I'd like to move users of SkTDynamicHash to SkTHashTable, SkTHashMap, or SkTHashSet. This is roughly outlined in the attached Skia bug.
In this case, the conversion from SkTDynamicHash to SkTHashTable is pretty trivial. The main change is that the values stored in the table are no longer assumed to be pointers, so we just need to sprinkle in a couple of * and ->.
SkResourceCache is particularly interesting as the locus of the attached Chromium bug. Porting this now means SkResourceCache will get any fixes we make as soon as we make them.
BUG=skia:6053,chromium:429375
Change-Id: If5dc8d331c62f1d4449fb8f9a7f7e9c746070213
Reviewed-on: https://skia-review.googlesource.com/5984
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out function declarations don't end in semicolons...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720
No public API changes.
TBR=reed@google.com
Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C++ standard library uses the name "release" for the operation we call "detach".
Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete).
This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release".
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002
Review URL: https://codereview.chromium.org/1809733002
|
|
|
|
|
|
|
|
|
|
|
| |
The current code deduplicates SkTypeface instances as all font lookups
should for better use of the glyph cache. This adds a request cache as
well, so that repeated recent requests will return the cached result
instead of doing a full lookup.
BUG=chromium:424082, chromium:444894
Review URL: https://codereview.chromium.org/1683883002
|
|
|
|
|
|
|
|
|
| |
Dump the memory statistics of resource cache and glyph cache using the
SkTraceMemoryDump interface.
BUG=chromium:503168
Review URL: https://codereview.chromium.org/1313793004
|
|
|
|
|
|
| |
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
|
|
|
|
|
|
|
| |
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1271033002
|
|
|
|
|
|
|
|
| |
patch from issue 954443002 at patchset 40001 (http://crrev.com/954443002#ps40001)
BUG=skia:
Review URL: https://codereview.chromium.org/950363002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
BUG=skia:
Review URL: https://codereview.chromium.org/825263005
|
|
|
|
|
|
| |
BUG=skia:
Review URL: https://codereview.chromium.org/876743002
|
|
|
|
|
|
| |
BUG=skia:
Review URL: https://codereview.chromium.org/670063004
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a unique-per-subclass namespace tag to make Keys from different
domains comparable.
Also drop the SkPictureShader cache and convert to using the global
resource cache instead.
R=reed@google.com,mtklein@google.com,robertphillips@google.com
Review URL: https://codereview.chromium.org/668223002
|
|
|
|
|
|
|
|
|
| |
- remove unused method and obsolete note
- add a reminder that yes, we are checking counts are equal
BUG=skia:
Review URL: https://codereview.chromium.org/667993002
|
|
|
|
|
|
|
|
| |
This reverts commit 37c5a815d8ea33247968212ef4cc83394ceee1bc.
TBR=mtklein
Review URL: https://codereview.chromium.org/635333002
|
|
|
|
|
|
|
|
|
|
|
| |
use it for SkMipMap"
This reverts commit 92561a0b99ad6c08ab7a11dd1872f028199392e9.
crasher in question:
https://code.google.com/p/chromium/issues/detail?id=420178
Review URL: https://codereview.chromium.org/617613003
|
|
|
|
| |
Review URL: https://codereview.chromium.org/592843003
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 595aa05efcb504e85358b8d328ac4a9fa1c46e2e.
BUG=skia:
R=mtklein@google.com, danakj@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/569353002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(patchset #2 id:20001 of https://codereview.chromium.org/567393002/)
Reason for revert:
crashes on android bots, haven't diagnosed yet
Original issue's description:
> Change SkResourceCache to take a Visitor inside its find().
>
> This simplifies the API/contract, in that there are not any exposed
> lock/unlock scopes.
>
>
> patch from issue 572573002
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/dee6a8e67db39fcbde2b3bb09be1d088ebb9db8a
R=mtklein@google.com, danakj@chromium.org
TBR=danakj@chromium.org, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/569303002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the API/contract, in that there are not any exposed
lock/unlock scopes.
patch from issue 572573002
BUG=skia:
R=mtklein@google.com, danakj@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/567393002
|
|
|
|
|
|
|
|
| |
TBR=halcananry
Author: reed@google.com
Review URL: https://codereview.chromium.org/554263005
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
BUG=skia:2896
R=junov@chromium.org, reed@google.com
Author: piotaixr@chromium.org
Review URL: https://codereview.chromium.org/533713003
|
|
BUG=skia:
R=bsalomon@google.com, mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/511283002
|