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

Unified Diff: src/lazy/SkCachingPixelRef.cpp

Issue 1017293002: guarded change to SkImageGenerator to make getInfo() const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/images/SkDecodingImageGenerator.cpp ('k') | src/lazy/SkDiscardablePixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkCachingPixelRef.cpp
diff --git a/src/lazy/SkCachingPixelRef.cpp b/src/lazy/SkCachingPixelRef.cpp
index dc53a5d6c78c7cf651f545a32482d23500d78633..5fc0d2a87fa7180e88ed3404c175ee0750cf2f5e 100644
--- a/src/lazy/SkCachingPixelRef.cpp
+++ b/src/lazy/SkCachingPixelRef.cpp
@@ -11,11 +11,12 @@
bool SkCachingPixelRef::Install(SkImageGenerator* generator,
SkBitmap* dst) {
- SkImageInfo info;
SkASSERT(dst != NULL);
- if ((NULL == generator)
- || !(generator->getInfo(&info))
- || !dst->setInfo(info)) {
+ if (NULL == generator) {
+ return false;
+ }
+ const SkImageInfo info = generator->getInfo();
+ if (!dst->setInfo(info)) {
SkDELETE(generator);
return false;
}
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | src/lazy/SkDiscardablePixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698