diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-24 21:50:04 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-02-24 21:50:04 +0000 |
commit | d90c141feb10c80581c16dbb57fcc97719a0c002 (patch) | |
tree | ea5f358a5113194c48e1fd7d5ade0685b3862ef1 /include/pdf | |
parent | a09368c9711e32257600e0f7deae2d6ba3fb5a76 (diff) |
[PDF] Clean up SkPDFStream and make it inherit from SkPDFDict.
A stream is a dictionary (with a couple particular entries) plus the data.
The common parent is useful for the shader implementation.
Review URL: http://codereview.appspot.com/4221045
git-svn-id: http://skia.googlecode.com/svn/trunk@852 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/pdf')
-rw-r--r-- | include/pdf/SkPDFStream.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/include/pdf/SkPDFStream.h b/include/pdf/SkPDFStream.h index 5310b4e896..35e199fb48 100644 --- a/include/pdf/SkPDFStream.h +++ b/include/pdf/SkPDFStream.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,8 +28,7 @@ class SkPDFCatalog; A stream object in a PDF. */ -// TODO(vandebo) This should handle filters as well. -class SkPDFStream : public SkPDFObject { +class SkPDFStream : public SkPDFDict { public: /** Create a PDF stream. A Length entry is automatically added to the * stream dictionary. @@ -43,26 +42,13 @@ public: bool indirect); virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect); - /** Add the value to the stream dictionary with the given key. Refs value. - * @param key The key for this dictionary entry. - * @param value The value for this dictionary entry. - * @return The value argument is returned. - */ - SkPDFObject* insert(SkPDFName* key, SkPDFObject* value); - - /** Add the value to the stream dictionary with the given key. Refs value. - * @param key The text of the key for this dictionary entry. - * @param value The value for this dictionary entry. - * @return The value argument is returned. - */ - SkPDFObject* insert(const char key[], SkPDFObject* value); - private: - SkPDFDict fDict; size_t fLength; // Only one of the two streams will be valid. SkRefPtr<SkStream> fPlainData; SkDynamicMemoryWStream fCompressedData; + + typedef SkPDFDict INHERITED; }; #endif |