| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() {} |
| OLD | NEW |