OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
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 SkPixelRef_DEFINED | 8 #ifndef SkPixelRef_DEFINED |
9 #define SkPixelRef_DEFINED | 9 #define SkPixelRef_DEFINED |
10 | 10 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], | 246 bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], |
247 SkYUVColorSpace* colorSpace) { | 247 SkYUVColorSpace* colorSpace) { |
248 return this->onGetYUV8Planes(sizes, planes, rowBytes, colorSpace); | 248 return this->onGetYUV8Planes(sizes, planes, rowBytes, colorSpace); |
249 } | 249 } |
250 | 250 |
251 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); | 251 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); |
252 | 252 |
253 /** | 253 /** |
254 * Makes a deep copy of this PixelRef, respecting the requested config. | 254 * Makes a deep copy of this PixelRef, respecting the requested config. |
255 * @param colorType Desired colortype. | 255 * @param colorType Desired colortype. |
256 * @param profileType Desired colorprofiletype. | |
256 * @param subset Subset of this PixelRef to copy. Must be fully contained w ithin the bounds of | 257 * @param subset Subset of this PixelRef to copy. Must be fully contained w ithin the bounds of |
257 * of this PixelRef. | 258 * of this PixelRef. |
258 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the destination could | 259 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the destination could |
259 * not be created with the given config), or this PixelRef does not support deep | 260 * not be created with the given config), or this PixelRef does not support deep |
260 * copies. | 261 * copies. |
261 */ | 262 */ |
262 virtual SkPixelRef* deepCopy(SkColorType, const SkIRect* /*subset*/) { | 263 virtual SkPixelRef* deepCopy(SkColorType, SkColorProfileType, const SkIRect* /*subset*/) { |
reed1
2014/12/19 21:32:56
are there any subclasses of this in Blink or Chrom
| |
263 return NULL; | 264 return NULL; |
264 } | 265 } |
265 | 266 |
266 #ifdef SK_BUILD_FOR_ANDROID | 267 #ifdef SK_BUILD_FOR_ANDROID |
267 /** | 268 /** |
268 * Acquire a "global" ref on this object. | 269 * Acquire a "global" ref on this object. |
269 * The default implementation just calls ref(), but subclasses can override | 270 * The default implementation just calls ref(), but subclasses can override |
270 * this method to implement additional behavior. | 271 * this method to implement additional behavior. |
271 */ | 272 */ |
272 virtual void globalRef(void* data=NULL); | 273 virtual void globalRef(void* data=NULL); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
401 /** | 402 /** |
402 * Allocate a new pixelref matching the specified ImageInfo, allocating | 403 * Allocate a new pixelref matching the specified ImageInfo, allocating |
403 * the memory for the pixels. If the ImageInfo requires a ColorTable, | 404 * the memory for the pixels. If the ImageInfo requires a ColorTable, |
404 * the pixelref will ref() the colortable. | 405 * the pixelref will ref() the colortable. |
405 * On failure return NULL. | 406 * On failure return NULL. |
406 */ | 407 */ |
407 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0; | 408 virtual SkPixelRef* create(const SkImageInfo&, size_t rowBytes, SkColorTable *) = 0; |
408 }; | 409 }; |
409 | 410 |
410 #endif | 411 #endif |
OLD | NEW |