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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 2337803002: Don't copy image buffer when calculating size.
Patch Set: Adding 'override' Created 4 years, 2 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/image/SkImage_Generator.cpp ('k') | 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 c9315bb14de24ad4f30186590b40d8b21743eb4a..e2c5c36c1378a908f00c2c8a6e6989d3f3905847 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -485,11 +485,7 @@ size_t SkImage::getDeferredTextureImageData(const GrContextThreadSafeProxy& prox
ctSize = SkAlign8(pixmap.ctable()->count() * 4);
}
} else {
- // 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.
- // yuv planes) upload.
- sk_sp<SkData> data(this->refEncoded());
- if (!data && !this->peekPixels(nullptr)) {
+ if (!as_IB(this)->canGenerateTexture(proxy)) {
reed1 2016/10/24 13:42:00 Is the predicate reversed here? If the image *can*
cblume 2016/10/25 02:51:01 Done.
return 0;
}
info = as_IB(this)->onImageInfo().makeWH(scaledSize.width(), scaledSize.height());
« no previous file with comments | « src/image/SkImage_Generator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698