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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 2176383002: start on apply gamma cleanup (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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/core/SkSurface.h ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index c331a295ce6d44031f1c0fb480aa3335b5a8eed2..25222fcc17547712caa45e4dde7c4a2b8738abd9 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -83,6 +83,9 @@ bool SkImage_Gpu::getROPixels(SkBitmap* dst, CachingHint chint) const {
GrTexture* SkImage_Gpu::asTextureRef(GrContext* ctx, const GrTextureParams& params,
SkSourceGammaTreatment gammaTreatment) const {
+ if (fTexture->getContext() != ctx) {
+ return nullptr;
+ }
return GrImageTextureAdjuster(as_IB(this)).refTextureSafeForParams(params, gammaTreatment,
nullptr);
}
« no previous file with comments | « include/core/SkSurface.h ('k') | src/image/SkSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698