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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 2098393002: SkPDF: SkPDFStream takes only SkStreamAsset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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/SkPDFFormXObject.cpp ('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 9a2e4a91030b95ab17eea92acb9071bce5e8e4d9..942fe65d2651b9705e39ddc90b221c7d0ab1b96c 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -672,7 +672,7 @@ static void populate_tiling_pattern_dict(SkPDFDict* pattern,
* @param gsIndex A graphics state resource index to apply, or <0 if no
* graphics state to apply.
*/
-static SkStream* create_pattern_fill_content(int gsIndex, SkRect& bounds) {
+static SkStreamAsset* create_pattern_fill_content(int gsIndex, SkRect& bounds) {
SkDynamicMemoryWStream content;
if (gsIndex >= 0) {
SkPDFUtils::ApplyGraphicState(gsIndex, &content);
@@ -699,7 +699,7 @@ static sk_sp<SkPDFObject> create_smask_graphic_state(
sk_sp<SkPDFObject> luminosityShader(
get_pdf_shader_by_state(doc, dpi, &alphaToLuminosityState));
- std::unique_ptr<SkStream> alphaStream(create_pattern_fill_content(-1, bbox));
+ std::unique_ptr<SkStreamAsset> alphaStream(create_pattern_fill_content(-1, bbox));
auto resources =
get_gradient_resource_dict(luminosityShader.get(), nullptr);
@@ -738,7 +738,7 @@ SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create(
auto resourceDict =
get_gradient_resource_dict(colorShader.get(), alphaGs.get());
- std::unique_ptr<SkStream> colorStream(
+ std::unique_ptr<SkStreamAsset> colorStream(
create_pattern_fill_content(0, bbox));
alphaFunctionShader->setData(colorStream.get());
« no previous file with comments | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698