| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef SkPDFBitmap_DEFINED | 7 #ifndef SkPDFBitmap_DEFINED |
| 8 #define SkPDFBitmap_DEFINED | 8 #define SkPDFBitmap_DEFINED |
| 9 | 9 |
| 10 #include "SkPDFTypes.h" | 10 #include "SkPDFTypes.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * there is no way around this. | 21 * there is no way around this. |
| 22 * | 22 * |
| 23 * The SkPDFBitmap::Create function will check the canon for duplicates. | 23 * The SkPDFBitmap::Create function will check the canon for duplicates. |
| 24 */ | 24 */ |
| 25 class SkPDFBitmap : public SkPDFObject { | 25 class SkPDFBitmap : public SkPDFObject { |
| 26 public: | 26 public: |
| 27 // Returns NULL on unsupported bitmap; | 27 // Returns NULL on unsupported bitmap; |
| 28 static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&); | 28 static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&); |
| 29 ~SkPDFBitmap(); | 29 ~SkPDFBitmap(); |
| 30 void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE; | 30 void emitObject(SkWStream*, SkPDFCatalog*) SK_OVERRIDE; |
| 31 void addResources(SkTSet<SkPDFObject*>* resourceSet, | 31 void addResources(SkPDFCatalog*) const SK_OVERRIDE; |
| 32 SkPDFCatalog* catalog) const SK_OVERRIDE; | |
| 33 bool equals(const SkBitmap& other) const { | 32 bool equals(const SkBitmap& other) const { |
| 34 return fBitmap.getGenerationID() == other.getGenerationID() && | 33 return fBitmap.getGenerationID() == other.getGenerationID() && |
| 35 fBitmap.pixelRefOrigin() == other.pixelRefOrigin() && | 34 fBitmap.pixelRefOrigin() == other.pixelRefOrigin() && |
| 36 fBitmap.dimensions() == other.dimensions(); | 35 fBitmap.dimensions() == other.dimensions(); |
| 37 } | 36 } |
| 38 | 37 |
| 39 private: | 38 private: |
| 40 const SkBitmap fBitmap; | 39 const SkBitmap fBitmap; |
| 41 const SkAutoTUnref<SkPDFObject> fSMask; | 40 const SkAutoTUnref<SkPDFObject> fSMask; |
| 42 SkPDFBitmap(const SkBitmap&, SkPDFObject*); | 41 SkPDFBitmap(const SkBitmap&, SkPDFObject*); |
| 43 void emitDict(SkWStream*, SkPDFCatalog*, size_t) const; | 42 void emitDict(SkWStream*, SkPDFCatalog*, size_t) const; |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 #endif // SkPDFBitmap_DEFINED | 45 #endif // SkPDFBitmap_DEFINED |
| OLD | NEW |