| Index: src/gpu/GrTextureProvider.cpp
|
| diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp
|
| index 3596ba6c12ce3287deb489a6d760d1344d4abc9b..ee4f651c1078558d3a8cfe42910d6249afa02fc1 100644
|
| --- a/src/gpu/GrTextureProvider.cpp
|
| +++ b/src/gpu/GrTextureProvider.cpp
|
| @@ -199,3 +199,14 @@ GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke
|
| }
|
| return NULL;
|
| }
|
| +
|
| +GrRenderTarget* GrTextureProvider::findAndRefRenderTargetByUniqueKey(const GrUniqueKey& key) {
|
| + ASSERT_SINGLE_OWNER
|
| + GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key);
|
| + if (resource) {
|
| + GrRenderTarget* rt = static_cast<GrSurface*>(resource)->asRenderTarget();
|
| + SkASSERT(rt);
|
| + return rt;
|
| + }
|
| + return nullptr;
|
| +}
|
|
|