| Index: include/gpu/GrTextureProvider.h
|
| diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h
|
| index 5635583d80fef393a746ae75f32edc0d2a3c8025..906e7b6567a6c3ce7ae6506d8d1a000355f5cf99 100644
|
| --- a/include/gpu/GrTextureProvider.h
|
| +++ b/include/gpu/GrTextureProvider.h
|
| @@ -46,6 +46,7 @@ public:
|
| GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key);
|
| if (resource) {
|
| GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture();
|
| + SkASSERT(texture->fromRawPixels2() || texture->fException2);
|
| SkASSERT(texture);
|
| return texture;
|
| }
|
| @@ -101,11 +102,16 @@ public:
|
| kApprox_ScratchTexMatch
|
| };
|
| GrTexture* refScratchTexture(const GrSurfaceDesc& desc, ScratchTexMatch match) {
|
| + GrTexture* texture;
|
| if (kApprox_ScratchTexMatch == match) {
|
| - return this->createApproxTexture(desc);
|
| + texture = this->createApproxTexture(desc);
|
| } else {
|
| - return this->createTexture(desc, true);
|
| + texture = this->createTexture(desc, true);
|
| }
|
| + if (texture) {
|
| + SkASSERT(!texture->fromRawPixels2());
|
| + }
|
| + return texture;
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////
|
|
|