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

Unified Diff: src/lazy/SkDiscardablePixelRef.h

Issue 1775493002: Revert of Update Skia's YUV API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/gpu/SkGr.cpp ('k') | tests/ImageGeneratorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkDiscardablePixelRef.h
diff --git a/src/lazy/SkDiscardablePixelRef.h b/src/lazy/SkDiscardablePixelRef.h
index 73a2b082501b6d671f1909334268d48c0185312c..695d441d2b1a05baa1373da848c7d645d8359c72 100644
--- a/src/lazy/SkDiscardablePixelRef.h
+++ b/src/lazy/SkDiscardablePixelRef.h
@@ -54,22 +54,16 @@
size_t rowBytes,
SkDiscardableMemory::Factory* factory);
- bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const override {
+ bool onGetYUV8Planes(SkISize sizes[3],
+ void* planes[3],
+ size_t rowBytes[3],
+ SkYUVColorSpace* colorSpace) override {
// If the image was already decoded with lockPixels(), favor not
// re-decoding to YUV8 planes.
if (fDiscardableMemory) {
return false;
}
- return fGenerator->queryYUV8(sizeInfo, colorSpace);
- }
-
- bool onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) override {
- // If the image was already decoded with lockPixels(), favor not
- // re-decoding to YUV8 planes.
- if (fDiscardableMemory) {
- return false;
- }
- return fGenerator->getYUV8Planes(sizeInfo, planes);
+ return fGenerator->getYUV8Planes(sizes, planes, rowBytes, colorSpace);
}
friend bool SkDEPRECATED_InstallDiscardablePixelRef(SkImageGenerator*, const SkIRect*, SkBitmap*,
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | tests/ImageGeneratorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698