Chromium Code Reviews| Index: src/image/SkImage_Gpu.h |
| diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h |
| index 13c1e306dc93b95b66ac4611733a90371354f547..1d0c7e990f5bc12789006134e46b91ca000442b5 100644 |
| --- a/src/image/SkImage_Gpu.h |
| +++ b/src/image/SkImage_Gpu.h |
| @@ -50,6 +50,15 @@ public: |
| } |
| bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes, |
| int srcX, int srcY, CachingHint) const override; |
| +#if SK_SUPPORT_GPU |
| + bool canGenerateTexture(const GrContextThreadSafeProxy& proxy) const override |
| + { |
| + if (fTexture) { |
| + return fTexture->getContext()->uniqueID() == proxy.uniqueID(); |
| + } |
| + return false; |
| + } |
| +#endif |
|
cblume
2016/11/16 01:07:16
This might be a tad large for being in the .h -- s
|
| private: |
| sk_sp<GrTexture> fTexture; |