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

Unified Diff: src/image/SkImage.cpp

Issue 1288403002: add SkImage::NewFromPicture and a GM to test it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/SkImage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage.cpp
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 241904b3a3d8bc68fee5f4537b8a1469952dd381..9c996dc7b836c8124c8d6af803d6bf1150f72668 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -279,6 +279,14 @@ bool SkImage_Base::onAsLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode mode) con
return true;
}
+SkImage* SkImage::NewFromPicture(const SkPicture* picture, const SkISize& dimensions,
+ const SkMatrix* matrix, const SkPaint* paint) {
+ if (!picture) {
+ return nullptr;
+ }
+ return NewFromGenerator(SkImageGenerator::NewFromPicture(dimensions, picture, matrix, paint));
+}
+
//////////////////////////////////////////////////////////////////////////////////////
#if !SK_SUPPORT_GPU
« no previous file with comments | « include/core/SkImage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698