Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: include/gpu/GrTextureProvider.h

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrTextureAccess.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
///////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/gpu/GrTextureAccess.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698