Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkDecodingImageGenerator_DEFINED | 8 #ifndef SkDecodingImageGenerator_DEFINED |
| 9 #define SkDecodingImageGenerator_DEFINED | 9 #define SkDecodingImageGenerator_DEFINED |
| 10 | 10 |
| 11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
| 12 #include "SkImageGenerator.h" | 12 #include "SkImageGenerator.h" |
| 13 | 13 |
| 14 class SkData; | 14 class SkData; |
| 15 class SkStreamRewindable; | 15 class SkStreamRewindable; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * An implementation of SkImageGenerator that calls into | 18 * An implementation of SkImageGenerator that calls into |
| 19 * SkImageDecoder. | 19 * SkImageDecoder. |
| 20 */ | 20 */ |
| 21 namespace SkDecodingImageGenerator { | 21 namespace SkDecodingImageGenerator { |
|
scroggo
2014/05/23 20:07:55
I still need this file to be public though.
| |
| 22 /** | 22 /** |
| 23 * These options will be passed on to the image decoder. The | 23 * These options will be passed on to the image decoder. The |
| 24 * defaults are sensible. | 24 * defaults are sensible. |
| 25 * | 25 * |
| 26 * @param fSampleSize If set to > 1, tells the decoder to return a | 26 * @param fSampleSize If set to > 1, tells the decoder to return a |
| 27 * smaller than original bitmap, sampling 1 pixel for | 27 * smaller than original bitmap, sampling 1 pixel for |
| 28 * every size pixels. e.g. if sample size is set to 3, | 28 * every size pixels. e.g. if sample size is set to 3, |
| 29 * then the returned bitmap will be 1/3 as wide and high, | 29 * then the returned bitmap will be 1/3 as wide and high, |
| 30 * and will contain 1/9 as many pixels as the original. | 30 * and will contain 1/9 as many pixels as the original. |
| 31 * Note: this is a hint, and the codec may choose to | 31 * Note: this is a hint, and the codec may choose to |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 // SkDecodingImageGenerator::Create( | 122 // SkDecodingImageGenerator::Create( |
| 123 // data, SkDecodingImageGenerator::Options()), dst, NULL); | 123 // data, SkDecodingImageGenerator::Options()), dst, NULL); |
| 124 // } | 124 // } |
| 125 // bool install_stream(SkStreamRewindable* stream, SkBitmap* dst) { | 125 // bool install_stream(SkStreamRewindable* stream, SkBitmap* dst) { |
| 126 // return SkInstallDiscardablePixelRef( | 126 // return SkInstallDiscardablePixelRef( |
| 127 // SkDecodingImageGenerator::Create( | 127 // SkDecodingImageGenerator::Create( |
| 128 // stream, SkDecodingImageGenerator::Options()), dst, NULL); | 128 // stream, SkDecodingImageGenerator::Options()), dst, NULL); |
| 129 // } | 129 // } |
| 130 | 130 |
| 131 #endif // SkDecodingImageGenerator_DEFINED | 131 #endif // SkDecodingImageGenerator_DEFINED |
| OLD | NEW |