Commit Graph

4 Commits

Author SHA1 Message Date
Brian Osman
5fcd3913da Fix path renderer cache test logic to account for other resources
Bug: skia:
Change-Id: Iadf88cc07fac23544317166699138644218b38d1
Reviewed-on: https://skia-review.googlesource.com/55141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-04 19:10:12 +00:00
Greg Daniel
c42b20b832 Revert "Revert "When flushing, reset flush state before op lists""
This reverts commit f8bc0018be.

Reason for revert: disabling failing test

Original change's description:
> Revert "When flushing, reset flush state before op lists"
> 
> This reverts commit 78bdee200c.
> 
> Reason for revert: breaking PathRendererCacheTests.cpp unit test
> 
> Original change's description:
> > When flushing, reset flush state before op lists
> > 
> > When we reset the flush state after executing the ops in a flush, we reset
> > the stored pipelines which may be holding refs to resources in their processors.
> > 
> > We want the resources that we wrote to in the op list to be freed last for caching
> > LRU purposes. Thus we make sure to free all the pipeline resources first before
> > resetting and freeing the op lists
> > 
> > Bug: skia:
> > Change-Id: I5b02e9b7532007b5854e906bf4d64e901e7e7e53
> > Reviewed-on: https://skia-review.googlesource.com/54760
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> Change-Id: If74a158e90316553a401386c8c7a6b3c2b29a7df
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/55080
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Bug: skia:
Change-Id: Ibdfe37c1f9e54956bf1725d1d7474a69efcd7673
Reviewed-on: https://skia-review.googlesource.com/55102
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-04 15:03:33 +00:00
Brian Osman
e9242ca695 Invalidate textures cached by SW path renderer when paths go away
Bug: skia:
Change-Id: Icfc2f1bd57c0cf7be54469b6d86cbd436b59155d
Reviewed-on: https://skia-review.googlesource.com/51201
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-26 19:07:46 +00:00
Brian Osman
f6f7cf6098 Invalidate path VBs when paths are destroyed
For this to work, we need access to the "original" path,
before any style was applied. To that end, add an original
path to GrShape (and unit tests of that functionality).

Then add a version of addGenIDChangeListener to GrShape,
that propagates to the original path, and use that in
tessellating path renderer.

Includes unit tests of caching behavior in the PR, all
of which failed without this change.

Bug: skia:
Change-Id: I98bb505f521e8ff07184f5c3fbd3c5fd1a22d3d5
Reviewed-on: https://skia-review.googlesource.com/50300
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-26 12:52:36 +00:00