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

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

Issue 516463005: Add support for the Rec601 YUV color space to GrYUVtoRGBEffect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use float literals to make VS happy Created 6 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
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkImageInfo.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 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
11 #include "SkColor.h"
11 #include "SkImageInfo.h" 12 #include "SkImageInfo.h"
12 #include "SkColor.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 class SkData; 15 class SkData;
16 class SkImageGenerator; 16 class SkImageGenerator;
17 17
18 /** 18 /**
19 * Takes ownership of SkImageGenerator. If this method fails for 19 * Takes ownership of SkImageGenerator. If this method fails for
20 * whatever reason, it will return false and immediatetely delete 20 * whatever reason, it will return false and immediatetely delete
21 * the generator. If it succeeds, it will modify destination 21 * the generator. If it succeeds, it will modify destination
22 * bitmap. 22 * bitmap.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 * If planes or rowBytes is NULL or if any entry in planes is NULL or if an y entry in rowBytes 114 * If planes or rowBytes is NULL or if any entry in planes is NULL or if an y entry in rowBytes
115 * is 0, this imagegenerator should output the sizes and return true if it can efficiently 115 * is 0, this imagegenerator should output the sizes and return true if it can efficiently
116 * return YUV planar data. If it cannot, it should return false. Note that either planes and 116 * return YUV planar data. If it cannot, it should return false. Note that either planes and
117 * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0 117 * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0
118 * entries only. Having only partial planes/rowBytes information is not sup ported. 118 * entries only. Having only partial planes/rowBytes information is not sup ported.
119 * 119 *
120 * If all planes and rowBytes entries are non NULL or non 0, then it should copy the 120 * If all planes and rowBytes entries are non NULL or non 0, then it should copy the
121 * associated YUV data into those planes of memory supplied by the caller. It should validate 121 * associated YUV data into those planes of memory supplied by the caller. It should validate
122 * that the sizes match what it expected. If the sizes do not match, it sho uld return false. 122 * that the sizes match what it expected. If the sizes do not match, it sho uld return false.
123 */ 123 */
124 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]); 124 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
125 SkYUVColorSpace* colorSpace);
125 126
126 protected: 127 protected:
127 virtual SkData* onRefEncodedData(); 128 virtual SkData* onRefEncodedData();
128 virtual bool onGetInfo(SkImageInfo* info); 129 virtual bool onGetInfo(SkImageInfo* info);
129 virtual bool onGetPixels(const SkImageInfo& info, 130 virtual bool onGetPixels(const SkImageInfo& info,
130 void* pixels, size_t rowBytes, 131 void* pixels, size_t rowBytes,
131 SkPMColor ctable[], int* ctableCount); 132 SkPMColor ctable[], int* ctableCount);
132 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]);
134 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3],
135 SkYUVColorSpace* colorSpace);
133 }; 136 };
134 137
135 #endif // SkImageGenerator_DEFINED 138 #endif // SkImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698