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

Unified Diff: src/pdf/SkPDFCanon.cpp

Issue 1788263002: SkPDF: remove all globally references SkPDFObjects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add explanatory comments 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/pdf/SkPDFCanon.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanon.cpp
diff --git a/src/pdf/SkPDFCanon.cpp b/src/pdf/SkPDFCanon.cpp
index 4fdaa0db628cf14b27fd4e26b966a913e5a7ead2..d7aea8ad69ff976128c83150d3a9345991eee259 100644
--- a/src/pdf/SkPDFCanon.cpp
+++ b/src/pdf/SkPDFCanon.cpp
@@ -149,3 +149,25 @@ const SkImage* SkPDFCanon::bitmapToImage(const SkBitmap& bm) {
bm.copyTo(&n32bitmap, kN32_SkColorType);
return *fBitmapToImageMap.set(key, SkImage::NewFromBitmap(n32bitmap));
}
+
+sk_sp<SkPDFStream> SkPDFCanon::makeInvertFunction() {
+ if (fInvertFunction) {
+ return fInvertFunction;
+ }
+ fInvertFunction = SkPDFGraphicState::MakeInvertFunction();
+ return fInvertFunction;
+}
+sk_sp<SkPDFDict> SkPDFCanon::makeNoSmaskGraphicState() {
+ if (fNoSmaskGraphicState) {
+ return fNoSmaskGraphicState;
+ }
+ fNoSmaskGraphicState = SkPDFGraphicState::MakeNoSmaskGraphicState();
+ return fNoSmaskGraphicState;
+}
+sk_sp<SkPDFArray> SkPDFCanon::makeRangeObject() {
+ if (fRangeObject) {
+ return fRangeObject;
+ }
+ fRangeObject = SkPDFShader::MakeRangeObject();
+ return fRangeObject;
+}
« no previous file with comments | « src/pdf/SkPDFCanon.h ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698