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

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

Issue 1149553002: SkImage::NewFromYUVTexturesCopy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warnings 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 | « gm/imagefromyuvtextures.cpp ('k') | src/gpu/GrGpu.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 /** 76 /**
77 * Create a new image by copying the pixels from the specified descriptor. No reference is 77 * Create a new image by copying the pixels from the specified descriptor. No reference is
78 * kept to the original platform texture. 78 * kept to the original platform texture.
79 * 79 *
80 * Will return NULL if the specified descriptor is unsupported. 80 * Will return NULL if the specified descriptor is unsupported.
81 */ 81 */
82 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, 82 static SkImage* NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&,
83 SkAlphaType = kPremul_SkAlphaType); 83 SkAlphaType = kPremul_SkAlphaType);
84 84
85 /**
86 * Create a new image by copying the pixels from the specified y, u, v text ures. The data
87 * from the textures is immediately ingested into the image and the texture s can be modified or
88 * deleted after the function returns. The image will have the dimensions o f the y texture.
89 */
90 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace,
91 const GrBackendObject yuvTextureHandl es[3],
92 const SkISize yuvSizes[3],
93 GrSurfaceOrigin);
94
85 int width() const { return fWidth; } 95 int width() const { return fWidth; }
86 int height() const { return fHeight; } 96 int height() const { return fHeight; }
87 uint32_t uniqueID() const { return fUniqueID; } 97 uint32_t uniqueID() const { return fUniqueID; }
88 virtual bool isOpaque() const { return false; } 98 virtual bool isOpaque() const { return false; }
89 99
90 /** 100 /**
91 * Return the GrTexture that stores the image pixels. Calling getTexture 101 * Return the GrTexture that stores the image pixels. Calling getTexture
92 * does not affect the reference count of the GrTexture object. 102 * does not affect the reference count of the GrTexture object.
93 * Will return NULL if the image does not use a texture. 103 * Will return NULL if the image does not use a texture.
94 */ 104 */
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 const int fWidth; 196 const int fWidth;
187 const int fHeight; 197 const int fHeight;
188 const uint32_t fUniqueID; 198 const uint32_t fUniqueID;
189 199
190 static uint32_t NextUniqueID(); 200 static uint32_t NextUniqueID();
191 201
192 typedef SkRefCnt INHERITED; 202 typedef SkRefCnt INHERITED;
193 }; 203 };
194 204
195 #endif 205 #endif
OLDNEW
« no previous file with comments | « gm/imagefromyuvtextures.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698