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

Side by Side Diff: src/utils/SkBitmapRegionCanvas.h

Issue 1288963002: Provides multiple implementations of Android's SkBitmapRegionDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use nullptr instead of NULL Created 5 years, 3 months 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
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 "SkScanlineDecoder.h"
11
12 /*
13 * This class implements SkBitmapRegionDecoder by drawing to an SkCanvas.
scroggo 2015/09/01 22:05:28 I'm not sure this captures what is interesting abo
msarett 2015/09/02 18:02:23 It also does some subsetting. Since we can only d
14 */
15 class SkBitmapRegionCanvas : public SkBitmapRegionDecoder {
16 public:
17
18 /*
19 * Takes ownership of pointer to decoder
20 */
21 SkBitmapRegionCanvas(SkScanlineDecoder* decoder);
22
23 /*
24 * This has several key differences from the Android version:
25 * Returns a Skia bitmap instead of an Android bitmap.
26 * Android version attempts to reuse a recycled bitmap.
27 */
28 SkBitmap* decodeRegion(int start_x, int start_y, int width, int height,
29 int sampleSize, SkColorType prefColorType) override;
30
31 private:
32
33 SkAutoTDelete<SkScanlineDecoder> fDecoder;
34
35 typedef SkBitmapRegionDecoder INHERITED;
36
37 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698