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

Side by Side Diff: src/pdf/SkPDFFormXObject.cpp

Issue 2098393002: SkPDF: SkPDFStream takes only SkStreamAsset (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFFormXObject.h ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "SkPDFFormXObject.h" 9 #include "SkPDFFormXObject.h"
10 10
(...skipping 25 matching lines...) Expand all
36 SkASSERT(false); 36 SkASSERT(false);
37 inverse.reset(); 37 inverse.reset();
38 } 38 }
39 this->insertObject("Matrix", SkPDFUtils::MatrixToArray(inverse)); 39 this->insertObject("Matrix", SkPDFUtils::MatrixToArray(inverse));
40 } 40 }
41 } 41 }
42 42
43 /** 43 /**
44 * Creates a FormXObject from a content stream and associated resources. 44 * Creates a FormXObject from a content stream and associated resources.
45 */ 45 */
46 SkPDFFormXObject::SkPDFFormXObject(SkStream* content, SkRect bbox, 46 SkPDFFormXObject::SkPDFFormXObject(SkStreamAsset* content, SkRect bbox,
47 SkPDFDict* resourceDict) { 47 SkPDFDict* resourceDict) {
48 setData(content); 48 setData(content);
49 49
50 sk_sp<SkPDFArray> bboxArray(SkPDFUtils::RectToArray(bbox)); 50 sk_sp<SkPDFArray> bboxArray(SkPDFUtils::RectToArray(bbox));
51 this->init("DeviceRGB", resourceDict, bboxArray.get()); 51 this->init("DeviceRGB", resourceDict, bboxArray.get());
52 } 52 }
53 53
54 /** 54 /**
55 * Common initialization code. 55 * Common initialization code.
56 * Note that bbox is unreferenced here, so calling code does not need worry. 56 * Note that bbox is unreferenced here, so calling code does not need worry.
(...skipping 11 matching lines...) Expand all
68 group->insertName("S", "Transparency"); 68 group->insertName("S", "Transparency");
69 69
70 if (colorSpace != nullptr) { 70 if (colorSpace != nullptr) {
71 group->insertName("CS", colorSpace); 71 group->insertName("CS", colorSpace);
72 } 72 }
73 group->insertBool("I", true); // Isolated. 73 group->insertBool("I", true); // Isolated.
74 this->insertObject("Group", std::move(group)); 74 this->insertObject("Group", std::move(group));
75 } 75 }
76 76
77 SkPDFFormXObject::~SkPDFFormXObject() {} 77 SkPDFFormXObject::~SkPDFFormXObject() {}
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFormXObject.h ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698