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

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

Issue 249373003: Revert of eliminate config param -- it was always self's config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | include/gpu/SkGrPixelRef.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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 217
218 /** Are we really wrapping a texture instead of a bitmap? 218 /** Are we really wrapping a texture instead of a bitmap?
219 */ 219 */
220 virtual GrTexture* getTexture() { return NULL; } 220 virtual GrTexture* getTexture() { return NULL; }
221 221
222 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL); 222 bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL);
223 223
224 /** 224 /**
225 * Makes a deep copy of this PixelRef, respecting the requested config. 225 * Makes a deep copy of this PixelRef, respecting the requested config.
226 * @param config Desired config.
226 * @param subset Subset of this PixelRef to copy. Must be fully contained w ithin the bounds of 227 * @param subset Subset of this PixelRef to copy. Must be fully contained w ithin the bounds of
227 * of this PixelRef. 228 * of this PixelRef.
228 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the destination could 229 * @return A new SkPixelRef, or NULL if either there is an error (e.g. the destination could
229 * not be created with the given config), or this PixelRef does not support deep 230 * not be created with the given config), or this PixelRef does not support deep
230 * copies. 231 * copies.
231 */ 232 */
232 virtual SkPixelRef* deepCopy(const SkIRect* subset = NULL) { 233 virtual SkPixelRef* deepCopy(SkBitmap::Config config, const SkIRect* subset = NULL) {
233 return NULL; 234 return NULL;
234 } 235 }
235 236
236 #ifdef SK_BUILD_FOR_ANDROID 237 #ifdef SK_BUILD_FOR_ANDROID
237 /** 238 /**
238 * Acquire a "global" ref on this object. 239 * Acquire a "global" ref on this object.
239 * The default implementation just calls ref(), but subclasses can override 240 * The default implementation just calls ref(), but subclasses can override
240 * this method to implement additional behavior. 241 * this method to implement additional behavior.
241 */ 242 */
242 virtual void globalRef(void* data=NULL); 243 virtual void globalRef(void* data=NULL);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 /** 371 /**
371 * Allocate a new pixelref matching the specified ImageInfo, allocating 372 * Allocate a new pixelref matching the specified ImageInfo, allocating
372 * the memory for the pixels. If the ImageInfo requires a ColorTable, 373 * the memory for the pixels. If the ImageInfo requires a ColorTable,
373 * the pixelref will ref() the colortable. 374 * the pixelref will ref() the colortable.
374 * On failure return NULL. 375 * On failure return NULL.
375 */ 376 */
376 virtual SkPixelRef* create(const SkImageInfo&, SkColorTable*) = 0; 377 virtual SkPixelRef* create(const SkImageInfo&, SkColorTable*) = 0;
377 }; 378 };
378 379
379 #endif 380 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698