diff options
author | Brian Osman <brianosman@google.com> | 2017-10-04 15:44:05 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-04 20:30:03 +0000 |
commit | b379dcd64eb69140f4393ac922d0774cc7d15596 (patch) | |
tree | 1b3b4a071d53d30865e842179a8685dec28b78d3 /src/gpu/GrShape.h | |
parent | 5fcd3913da4a13a19bf0bd87a7078ee2999194b7 (diff) |
Sever fOriginalPath connection whenever a GrShape becomes a simple type
When drawing a round-rect, for example, we may end up in drawPath with a
temporary path that was created with the rrect added. We ended up putting
a genID listener on that (stack allocated) path, so we would evict cache
entries immediately. This restores the old behavior, where cache entries
for paths derived from simple types are never invalidated.
Bug: skia:7087
Change-Id: I3eed9c3a289241bfe1e42036be3362f592256693
Reviewed-on: https://skia-review.googlesource.com/54460
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrShape.h')
-rw-r--r-- | src/gpu/GrShape.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h index dd8aa850d6..032c4d5e57 100644 --- a/src/gpu/GrShape.h +++ b/src/gpu/GrShape.h @@ -373,9 +373,11 @@ public: void addGenIDChangeListener(SkPathRef::GenIDChangeListener* listener) const; /** - * Gets the generation ID of the *original* path. This is only exposed for unit tests. + * Helpers that are only exposed for unit tests, to determine if the shape is a path, and get + * the generation ID of the *original* path. */ uint32_t testingOnly_getOriginalGenerationID() const; + bool testingOnly_isPath() const; private: |