Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
|
robertphillips
2013/03/11 18:25:55
Is this the right header?
djsollen
2013/03/11 19:43:24
Yes, as it is was originally release as part of AO
| |
| 2 * Copyright 2011 The Android Open Source Project | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 | |
| 9 #ifndef SkBitmapRegionDecoder_DEFINED | |
| 10 #define SkBitmapRegionDecoder_DEFINED | |
| 11 | |
| 12 #include "SkBitmap.h" | |
|
robertphillips
2013/03/11 18:25:55
I think we only need "class SkIRect;" here.
djsollen
2013/03/11 19:43:24
Done.
| |
| 13 #include "SkRect.h" | |
| 14 #include "SkImageDecoder.h" | |
| 15 #include "SkStream.h" | |
| 16 | |
|
robertphillips
2013/03/11 18:25:55
comment?
| |
| 17 class SkBitmapRegionDecoder { | |
| 18 public: | |
| 19 SkBitmapRegionDecoder(SkImageDecoder *decoder, SkStream *stream, | |
|
robertphillips
2013/03/11 18:25:55
line up next line?
| |
| 20 int width, int height) { | |
| 21 fDecoder = decoder; | |
| 22 fStream = stream; | |
| 23 fWidth = width; | |
| 24 fHeight = height; | |
| 25 } | |
| 26 virtual ~SkBitmapRegionDecoder() { | |
| 27 delete fDecoder; | |
| 28 fStream->unref(); | |
| 29 } | |
| 30 | |
| 31 virtual bool decodeRegion(SkBitmap* bitmap, SkIRect rect, | |
|
djsollen
2013/03/11 17:47:24
const SkIRect&
| |
| 32 SkBitmap::Config pref, int sampleSize); | |
| 33 | |
|
robertphillips
2013/03/11 18:25:55
consts?
djsollen
2013/03/11 19:43:24
Done.
| |
| 34 virtual int getWidth() { return fWidth; } | |
| 35 virtual int getHeight() { return fHeight; } | |
| 36 | |
| 37 virtual SkImageDecoder* getDecoder() { return fDecoder; } | |
| 38 | |
| 39 private: | |
| 40 SkImageDecoder *fDecoder; | |
| 41 SkStream *fStream; | |
| 42 int fWidth; | |
| 43 int fHeight; | |
| 44 }; | |
| 45 | |
| 46 #endif | |
| OLD | NEW |