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

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

Issue 374743003: Skia side RGB to YUV gpu conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixing Windows build Created 6 years, 5 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 | « gyp/tests.gypi ('k') | include/core/SkPixelRef.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
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 */ 109 */
110 bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, 110 bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
111 SkPMColor ctable[], int* ctableCount); 111 SkPMColor ctable[], int* ctableCount);
112 112
113 /** 113 /**
114 * Simplified version of getPixels() that asserts that info is NOT kIndex8_ SkColorType. 114 * Simplified version of getPixels() that asserts that info is NOT kIndex8_ SkColorType.
115 */ 115 */
116 bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes); 116 bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
117 #endif 117 #endif
118 118
119 /**
120 * If planes or rowBytes is NULL or if any entry in planes is NULL or if an y entry in rowBytes
121 * is 0, this imagegenerator should output the sizes and return true if it can efficiently
122 * return YUV planar data. If it cannot, it should return false. Note that either planes and
123 * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0
124 * entries only. Having only partial planes/rowBytes information is not sup ported.
125 *
126 * If all planes and rowBytes entries are non NULL or non 0, then it should copy the
127 * associated YUV data into those planes of memory supplied by the caller. It should validate
128 * that the sizes match what it expected. If the sizes do not match, it sho uld return false.
129 */
130 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]);
131
119 protected: 132 protected:
120 virtual SkData* onRefEncodedData(); 133 virtual SkData* onRefEncodedData();
121 virtual bool onGetInfo(SkImageInfo* info); 134 virtual bool onGetInfo(SkImageInfo* info);
122 virtual bool onGetPixels(const SkImageInfo& info, 135 virtual bool onGetPixels(const SkImageInfo& info,
123 void* pixels, size_t rowBytes, 136 void* pixels, size_t rowBytes,
124 SkPMColor ctable[], int* ctableCount); 137 SkPMColor ctable[], int* ctableCount);
138 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3]);
125 }; 139 };
126 140
127 #endif // SkImageGenerator_DEFINED 141 #endif // SkImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698