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 #ifndef SkPDFTypes_DEFINED | 9 #ifndef SkPDFTypes_DEFINED |
10 #define SkPDFTypes_DEFINED | 10 #define SkPDFTypes_DEFINED |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
339 create the PDF cross reference table. | 339 create the PDF cross reference table. |
340 */ | 340 */ |
341 class SkPDFObjNumMap : SkNoncopyable { | 341 class SkPDFObjNumMap : SkNoncopyable { |
342 public: | 342 public: |
343 /** Add the passed object to the catalog. | 343 /** Add the passed object to the catalog. |
344 * @param obj The object to add. | 344 * @param obj The object to add. |
345 * @return True iff the object was not already added to the catalog. | 345 * @return True iff the object was not already added to the catalog. |
346 */ | 346 */ |
347 bool addObject(SkPDFObject* obj); | 347 bool addObject(SkPDFObject* obj); |
348 | 348 |
349 /** Add the passed object to the catalog, as well as all it's dependencies. | |
tomhudson
2015/10/09 15:31:37
no apostrophe!
hal.canary
2015/10/09 19:13:27
Done. Im so embarrassed.
| |
350 * @param obj The object to add. If nullptr, this is a noop. | |
351 * @param subs Will be passed to obj->addResources(). | |
352 */ | |
353 void addObjectRecursively(SkPDFObject* obj, const SkPDFSubstituteMap& subs); | |
354 | |
349 /** Get the object number for the passed object. | 355 /** Get the object number for the passed object. |
350 * @param obj The object of interest. | 356 * @param obj The object of interest. |
351 */ | 357 */ |
352 int32_t getObjectNumber(SkPDFObject* obj) const; | 358 int32_t getObjectNumber(SkPDFObject* obj) const; |
353 | 359 |
354 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; } | 360 const SkTDArray<SkPDFObject*>& objects() const { return fObjects; } |
355 | 361 |
356 private: | 362 private: |
357 SkTDArray<SkPDFObject*> fObjects; | 363 SkTDArray<SkPDFObject*> fObjects; |
358 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers; | 364 SkTHashMap<SkPDFObject*, int32_t> fObjectNumbers; |
(...skipping 28 matching lines...) Expand all Loading... | |
387 }; | 393 }; |
388 | 394 |
389 #ifdef SK_PDF_IMAGE_STATS | 395 #ifdef SK_PDF_IMAGE_STATS |
390 extern SkAtomic<int> gDrawImageCalls; | 396 extern SkAtomic<int> gDrawImageCalls; |
391 extern SkAtomic<int> gJpegImageObjects; | 397 extern SkAtomic<int> gJpegImageObjects; |
392 extern SkAtomic<int> gRegularImageObjects; | 398 extern SkAtomic<int> gRegularImageObjects; |
393 extern void SkPDFImageDumpStats(); | 399 extern void SkPDFImageDumpStats(); |
394 #endif // SK_PDF_IMAGE_STATS | 400 #endif // SK_PDF_IMAGE_STATS |
395 | 401 |
396 #endif | 402 #endif |
OLD | NEW |