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

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

Issue 791823003: Add sRGB texture support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add in changes for copy_to_new_texture_pixelref Created 6 years 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 | « include/core/SkBitmap.h ('k') | include/gpu/GrColor.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 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
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
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
OLDNEW
« no previous file with comments | « include/core/SkBitmap.h ('k') | include/gpu/GrColor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698