diff options
author | Mike Reed <reed@google.com> | 2017-05-08 16:13:39 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-09 03:52:03 +0000 |
commit | 7f1d020bbfde245281fac88ff09b55366155be16 (patch) | |
tree | 12c5db2328c927802b441f026f1cd88e14f8e036 /src/image/SkImage_Base.h | |
parent | 090fbf86cf90dd326b3b3b59cde0a46b63a594a6 (diff) |
remove (possibly slow) call to refEncoded in getDeferredTextureImageData
- explicitly reject already-texture-backed and picture-backed
Needed to add a virtual to image_base and generator to distinguish
generators that can (or cannot) natively "generate" on the gpu (e.g. pictures)
Bug: 646089
Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f
Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f
Reviewed-on: https://skia-review.googlesource.com/15765
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r-- | src/image/SkImage_Base.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index 64c075daeb..95ad67af10 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -74,8 +74,12 @@ public: virtual bool onAsLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; + // True for picture-backed and codec-backed virtual bool onIsLazyGenerated() const { return false; } + // True only for generators that operate directly on gpu (e.g. picture-generators) + virtual bool onCanLazyGenerateOnGPU() const { return false; } + // Call when this image is part of the key to a resourcecache entry. This allows the cache // to know automatically those entries can be purged when this SkImage deleted. void notifyAddedToCache() const { |