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

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

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers Created 5 years, 6 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 | « no previous file | include/gpu/GrGpuResource.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 2012 Google Inc. 2 * Copyright 2012 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 SkImage_DEFINED 8 #ifndef SkImage_DEFINED
9 #define SkImage_DEFINED 9 #define SkImage_DEFINED
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 /** 67 /**
68 * Create a new image from the specified descriptor. Note - the caller is r esponsible for 68 * Create a new image from the specified descriptor. Note - the caller is r esponsible for
69 * managing the lifetime of the underlying platform texture. 69 * managing the lifetime of the underlying platform texture.
70 * 70 *
71 * Will return NULL if the specified descriptor is unsupported. 71 * Will return NULL if the specified descriptor is unsupported.
72 */ 72 */
73 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&, 73 static SkImage* NewFromTexture(GrContext*, const GrBackendTextureDesc&,
74 SkAlphaType = kPremul_SkAlphaType); 74 SkAlphaType = kPremul_SkAlphaType);
75 75
76 /** 76 /**
77 * Create a new image from the specified descriptor. Note - Skia will delet e or recycle the
78 * texture when the image is released.
79 *
80 * Will return NULL if the specified descriptor is unsupported.
81 */
82 static SkImage* NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc &,
83 SkAlphaType = kPremul_SkAlphaType);
84
85 /**
77 * Create a new image by copying the pixels from the specified descriptor. No reference is 86 * Create a new image by copying the pixels from the specified descriptor. No reference is
78 * kept to the original platform texture. 87 * kept to the original platform texture.
79 * 88 *
80 * Will return NULL if the specified descriptor is unsupported. 89 * Will return NULL if the specified descriptor is unsupported.
81 */ 90 */
82 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, 91 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&,
83 SkAlphaType = kPremul_SkAlphaType); 92 SkAlphaType = kPremul_SkAlphaType);
84 93
85 /** 94 /**
86 * Create a new image by copying the pixels from the specified y, u, v text ures. The data 95 * Create a new image by copying the pixels from the specified y, u, v text ures. The data
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const int fWidth; 213 const int fWidth;
205 const int fHeight; 214 const int fHeight;
206 const uint32_t fUniqueID; 215 const uint32_t fUniqueID;
207 216
208 static uint32_t NextUniqueID(); 217 static uint32_t NextUniqueID();
209 218
210 typedef SkRefCnt INHERITED; 219 typedef SkRefCnt INHERITED;
211 }; 220 };
212 221
213 #endif 222 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698