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

Side by Side Diff: tools/SkBitmapRegionCanvas.h

Issue 1425833002: Add NewFromStream and getEncodedFormat to BitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@brd-design
Patch Set: 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 | « no previous file | tools/SkBitmapRegionCodec.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBitmapRegionDecoderInterface.h" 9 #include "SkBitmapRegionDecoderInterface.h"
10 #include "SkCodec.h" 10 #include "SkCodec.h"
(...skipping 12 matching lines...) Expand all
23 * Takes ownership of pointer to decoder 23 * Takes ownership of pointer to decoder
24 */ 24 */
25 SkBitmapRegionCanvas(SkCodec* decoder); 25 SkBitmapRegionCanvas(SkCodec* decoder);
26 26
27 bool decodeRegion(SkBitmap* bitmap, SkBitmap::Allocator* allocator, 27 bool decodeRegion(SkBitmap* bitmap, SkBitmap::Allocator* allocator,
28 const SkIRect& desiredSubset, int sampleSize, 28 const SkIRect& desiredSubset, int sampleSize,
29 SkColorType colorType, bool requireUnpremul) override; 29 SkColorType colorType, bool requireUnpremul) override;
30 30
31 bool conversionSupported(SkColorType colorType) override; 31 bool conversionSupported(SkColorType colorType) override;
32 32
33 SkEncodedFormat getEncodedFormat() override { return fDecoder->getEncodedFor mat(); }
34
33 private: 35 private:
34 36
35 SkAutoTDelete<SkCodec> fDecoder; 37 SkAutoTDelete<SkCodec> fDecoder;
36 38
37 typedef SkBitmapRegionDecoderInterface INHERITED; 39 typedef SkBitmapRegionDecoderInterface INHERITED;
38 40
39 }; 41 };
OLDNEW
« no previous file with comments | « no previous file | tools/SkBitmapRegionCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698