Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: tools/android/SkBitmapRegionCanvas.h

Issue 1438873002: Move SkBitmapRegionDecoder to include/android and src/android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (header guards) Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/android/SkBRDAllocator.h ('k') | tools/android/SkBitmapRegionCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
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 #include "SkBitmap.h"
9 #include "SkBitmapRegionDecoder.h"
10 #include "SkCodec.h"
11
12 /*
13 * This class implements SkBitmapRegionDecoder using an SkCodec and
14 * an SkCanvas. It uses the scanline decoder to subset the height. It then
15 * will subset the width and scale by drawing to an SkCanvas.
16 */
17 // FIXME (msarett): This implementation does not support WEBP, because WEBP
18 // does not have a scanline decoder.
19 class SkBitmapRegionCanvas : public SkBitmapRegionDecoder {
20 public:
21
22 /*
23 * Takes ownership of pointer to decoder
24 */
25 SkBitmapRegionCanvas(SkCodec* decoder);
26
27 bool decodeRegion(SkBitmap* bitmap, SkBRDAllocator* allocator,
28 const SkIRect& desiredSubset, int sampleSize,
29 SkColorType colorType, bool requireUnpremul) override;
30
31 bool conversionSupported(SkColorType colorType) override;
32
33 SkEncodedFormat getEncodedFormat() override { return fDecoder->getEncodedFor mat(); }
34
35 private:
36
37 SkAutoTDelete<SkCodec> fDecoder;
38
39 typedef SkBitmapRegionDecoder INHERITED;
40
41 };
OLDNEW
« no previous file with comments | « tools/android/SkBRDAllocator.h ('k') | tools/android/SkBitmapRegionCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698