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

Side by Side Diff: src/images/SkDecodingImageGenerator.h

Issue 74793011: Add SkImageGenerator Interface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: whitespace Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/images/SkDecodingImageGenerator.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 2013 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 #ifndef SkDecodingImageGenerator_DEFINED
9 #define SkDecodingImageGenerator_DEFINED
10
11 #include "SkImageGenerator.h"
12
13 class SkBitmap;
14
15 /**
16 * Calls into SkImageDecoder::DecodeMemoryToTarget to implement a
17 * SkImageGenerator
18 */
19 class SkDecodingImageGenerator : public SkImageGenerator {
20 public:
21 /*
22 * The constructor will take a reference to the SkData. The
23 * destructor will unref() it.
24 */
25 SkDecodingImageGenerator(SkData* data);
26 virtual ~SkDecodingImageGenerator();
27
28 virtual SkData* refEncodedData() SK_OVERRIDE;
29
30 virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE;
31
32 virtual bool getPixels(const SkImageInfo& info,
33 void* pixels,
34 size_t rowBytes) SK_OVERRIDE;
35
36 /**
37 * Install the SkData into the destination bitmap, using a new
38 * SkDiscardablePixelRef and a new SkDecodingImageGenerator.
39 */
40 static bool Install(SkData* data, SkBitmap* destination);
41
42 private:
43 SkData* fData;
44 };
45 #endif // SkDecodingImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698