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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 2190883003: SkPDF: PDFStream has-a not is-a PDFDict (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-07-29 (Friday) 12:30:20 EDT Created 4 years, 5 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/SkPDFShader.h ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 612ff8707481b9c31e76f874c7da4fd303cebf4f..31af569fe947ef39c90bbaff79d3c5a5a9e58b4e 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -743,8 +743,9 @@ SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create(
create_pattern_fill_content(0, bbox));
alphaFunctionShader->setData(std::move(colorStream));
- populate_tiling_pattern_dict(alphaFunctionShader, bbox, resourceDict.get(),
- SkMatrix::I());
+ populate_tiling_pattern_dict(
+ alphaFunctionShader->dict(), bbox, resourceDict.get(),
+ SkMatrix::I());
doc->canon()->addAlphaShader(alphaFunctionShader);
return alphaFunctionShader;
}
@@ -804,9 +805,9 @@ static sk_sp<SkPDFStream> make_ps_function(
SkPDFArray* domain,
sk_sp<SkPDFObject> range) {
auto result = sk_make_sp<SkPDFStream>(std::move(psCode));
- result->insertInt("FunctionType", 4);
- result->insertObject("Domain", sk_ref_sp(domain));
- result->insertObject("Range", std::move(range));
+ result->dict()->insertInt("FunctionType", 4);
+ result->dict()->insertObject("Domain", sk_ref_sp(domain));
+ result->dict()->insertObject("Range", std::move(range));
return result;
}
@@ -1213,7 +1214,7 @@ SkPDFImageShader* SkPDFImageShader::Create(
imageShader->setData(patternDevice->content());
auto resourceDict = patternDevice->makeResourceDict();
- populate_tiling_pattern_dict(imageShader, patternBBox,
+ populate_tiling_pattern_dict(imageShader->dict(), patternBBox,
resourceDict.get(), finalMatrix);
imageShader->fShaderState->fImage.unlockPixels();
« no previous file with comments | « src/pdf/SkPDFShader.h ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698