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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 2337803002: Don't copy image buffer when calculating size.
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 06ec224a2a9cbc23fa02b83288128a4252329b26..59db33db91870f599f65cba9e050d242080fe7b4 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -488,7 +488,7 @@ size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy& prox
// Here we're just using presence of data to know whether there is a codec behind the image.
// In the future we will access the cacherator and get the exact data that we want to (e.g.
vmpstr 2016/09/12 23:35:27 nit: You should update the comment.
cblume 2016/09/13 00:02:26 Done.
// yuv planes) upload.
- sk_sp<SkData> data(this->refEncoded());
+ SkImageCacherator* data(as_IB(this)->peekCacherator());
vmpstr 2016/09/12 23:35:27 Can we just inline this in the if? I don't think w
cblume 2016/09/13 00:02:26 Done. This actually makes it read much more easily
if (!data && !this->peekPixels(nullptr)) {
return 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698