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

Side by Side Diff: include/core/SkImageGenerator.h

Issue 810603003: add new API, but empty impl (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | src/ports/SkImageGenerator_none.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 #ifndef SkImageGenerator_DEFINED 8 #ifndef SkImageGenerator_DEFINED
9 #define SkImageGenerator_DEFINED 9 #define SkImageGenerator_DEFINED
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0 109 * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0
110 * entries only. Having only partial planes/rowBytes information is not sup ported. 110 * entries only. Having only partial planes/rowBytes information is not sup ported.
111 * 111 *
112 * If all planes and rowBytes entries are non NULL or non 0, then it should copy the 112 * If all planes and rowBytes entries are non NULL or non 0, then it should copy the
113 * associated YUV data into those planes of memory supplied by the caller. It should validate 113 * associated YUV data into those planes of memory supplied by the caller. It should validate
114 * that the sizes match what it expected. If the sizes do not match, it sho uld return false. 114 * that the sizes match what it expected. If the sizes do not match, it sho uld return false.
115 */ 115 */
116 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], 116 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
117 SkYUVColorSpace* colorSpace); 117 SkYUVColorSpace* colorSpace);
118 118
119 /**
120 * If the default image decoder system can interpret the specified (encoded ) data, then
121 * this returns a new ImageGenerator for it. Otherwise this returns NULL. E ither way
122 * the caller is still responsible for managing their ownership of the data .
123 */
124 static SkImageGenerator* NewFromData(SkData*);
125
119 protected: 126 protected:
120 virtual SkData* onRefEncodedData(); 127 virtual SkData* onRefEncodedData();
121 virtual bool onGetInfo(SkImageInfo* info); 128 virtual bool onGetInfo(SkImageInfo* info);
122 virtual bool onGetPixels(const SkImageInfo& info, 129 virtual bool onGetPixels(const SkImageInfo& info,
123 void* pixels, size_t rowBytes, 130 void* pixels, size_t rowBytes,
124 SkPMColor ctable[], int* ctableCount); 131 SkPMColor ctable[], int* ctableCount);
125 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3]); 132 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3]);
126 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3], 133 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3],
127 SkYUVColorSpace* colorSpace); 134 SkYUVColorSpace* colorSpace);
128 }; 135 };
129 136
130 #endif // SkImageGenerator_DEFINED 137 #endif // SkImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/ports/SkImageGenerator_none.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698