| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 #include "SkData.h" | 8 #include "SkData.h" |
| 9 #include "SkDeflate.h" | 9 #include "SkDeflate.h" |
| 10 #include "SkPDFTypes.h" | 10 #include "SkPDFTypes.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 SkASSERT(!fDumped); | 390 SkASSERT(!fDumped); |
| 391 for (int i = 0; i < fRecords.count(); i++) { | 391 for (int i = 0; i < fRecords.count(); i++) { |
| 392 fRecords[i].fKey.addResources(catalog, substitutes); | 392 fRecords[i].fKey.addResources(catalog, substitutes); |
| 393 fRecords[i].fValue.addResources(catalog, substitutes); | 393 fRecords[i].fValue.addResources(catalog, substitutes); |
| 394 } | 394 } |
| 395 } | 395 } |
| 396 | 396 |
| 397 SkPDFDict::Record::Record(SkPDFUnion&& k, SkPDFUnion&& v) | 397 SkPDFDict::Record::Record(SkPDFUnion&& k, SkPDFUnion&& v) |
| 398 : fKey(std::move(k)), fValue(std::move(v)) {} | 398 : fKey(std::move(k)), fValue(std::move(v)) {} |
| 399 | 399 |
| 400 SkPDFDict::Record::Record(SkPDFDict::Record&& o) | |
| 401 : fKey(std::move(o.fKey)), fValue(std::move(o.fValue)) {} | |
| 402 | |
| 403 SkPDFDict::Record& SkPDFDict::Record::operator=(SkPDFDict::Record&& o) { | |
| 404 fKey = std::move(o.fKey); | |
| 405 fValue = std::move(o.fValue); | |
| 406 return *this; | |
| 407 } | |
| 408 | |
| 409 int SkPDFDict::size() const { return fRecords.count(); } | 400 int SkPDFDict::size() const { return fRecords.count(); } |
| 410 | 401 |
| 411 void SkPDFDict::insertObjRef(const char key[], sk_sp<SkPDFObject> objSp) { | 402 void SkPDFDict::insertObjRef(const char key[], sk_sp<SkPDFObject> objSp) { |
| 412 fRecords.emplace_back(SkPDFUnion::Name(key), SkPDFUnion::ObjRef(std::move(ob
jSp))); | 403 fRecords.emplace_back(SkPDFUnion::Name(key), SkPDFUnion::ObjRef(std::move(ob
jSp))); |
| 413 } | 404 } |
| 414 | 405 |
| 415 void SkPDFDict::insertObjRef(const SkString& key, sk_sp<SkPDFObject> objSp) { | 406 void SkPDFDict::insertObjRef(const SkString& key, sk_sp<SkPDFObject> objSp) { |
| 416 fRecords.emplace_back(SkPDFUnion::Name(key), SkPDFUnion::ObjRef(std::move(ob
jSp))); | 407 fRecords.emplace_back(SkPDFUnion::Name(key), SkPDFUnion::ObjRef(std::move(ob
jSp))); |
| 417 } | 408 } |
| 418 | 409 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 640 |
| 650 void SkPDFImageDumpStats() { | 641 void SkPDFImageDumpStats() { |
| 651 SkDebugf("\ntotal PDF drawImage/drawBitmap calls: %d\n" | 642 SkDebugf("\ntotal PDF drawImage/drawBitmap calls: %d\n" |
| 652 "total PDF jpeg images: %d\n" | 643 "total PDF jpeg images: %d\n" |
| 653 "total PDF regular images: %d\n", | 644 "total PDF regular images: %d\n", |
| 654 gDrawImageCalls.load(), | 645 gDrawImageCalls.load(), |
| 655 gJpegImageObjects.load(), | 646 gJpegImageObjects.load(), |
| 656 gRegularImageObjects.load()); | 647 gRegularImageObjects.load()); |
| 657 } | 648 } |
| 658 #endif // SK_PDF_IMAGE_STATS | 649 #endif // SK_PDF_IMAGE_STATS |
| OLD | NEW |