diff options
author | 2016-04-08 12:10:42 -0700 | |
---|---|---|
committer | 2016-04-08 12:10:42 -0700 | |
commit | 646125114b42b24e5ada3c9f8fac53a85f9ad2a0 (patch) | |
tree | c5d599427e99f89313131114b977f33232c3df48 /src/core/SkImageFilter.cpp | |
parent | 89c2a0b8c12879f94f746a5d9fe723a48434647f (diff) |
Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points
This more closely aligns the SkSpecialImage API with the SkImage API. In doing so it allows the image filters to handle SkImages that can sneak through while remaining encoded (e.g., if an input filter just returns a wrapped version of the source SkImage)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861643003
Review URL: https://codereview.chromium.org/1861643003
Diffstat (limited to 'src/core/SkImageFilter.cpp')
-rw-r--r-- | src/core/SkImageFilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index 743dc2ad1a..fb5c9157b6 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -601,10 +601,10 @@ sk_sp<SkSpecialImage> SkImageFilter::filterInput(int index, sk_sp<SkSpecialImage> result(input->filterImage(src, this->mapContext(ctx), offset)); #if SK_SUPPORT_GPU - if (src->peekTexture() && result && !result->peekTexture()) { + if (src->isTextureBacked() && result && !result->isTextureBacked()) { // Keep the result on the GPU - this is still required for some // image filters that don't support GPU in all cases - GrContext* context = src->peekTexture()->getContext(); + GrContext* context = src->getContext(); return result->makeTextureImage(src->internal_getProxy(), context); } #endif |