| OLD | NEW |
| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 /** | 131 /** |
| 132 * Create a new image by copying the pixels from the specified y, u, v text
ures. The data | 132 * Create a new image by copying the pixels from the specified y, u, v text
ures. The data |
| 133 * from the textures is immediately ingested into the image and the texture
s can be modified or | 133 * from the textures is immediately ingested into the image and the texture
s can be modified or |
| 134 * deleted after the function returns. The image will have the dimensions o
f the y texture. | 134 * deleted after the function returns. The image will have the dimensions o
f the y texture. |
| 135 */ | 135 */ |
| 136 static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, | 136 static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, |
| 137 const GrBackendObject yuvTextu
reHandles[3], | 137 const GrBackendObject yuvTextu
reHandles[3], |
| 138 const SkISize yuvSizes[3], | 138 const SkISize yuvSizes[3], |
| 139 GrSurfaceOrigin); | 139 GrSurfaceOrigin); |
| 140 | 140 |
| 141 /** |
| 142 * Create a new image by copying the pixels from the specified y and uv tex
tures. The data |
| 143 * from the textures is immediately ingested into the image and the texture
s can be modified or |
| 144 * deleted after the function returns. The image will have the dimensions o
f the y texture. |
| 145 */ |
| 146 static sk_sp<SkImage> MakeFromNV12TexturesCopy(GrContext*, SkYUVColorSpace, |
| 147 const GrBackendObject nv12Tex
tureHandles[2], |
| 148 const SkISize nv12Sizes[2], G
rSurfaceOrigin); |
| 149 |
| 141 static sk_sp<SkImage> MakeFromPicture(sk_sp<SkPicture>, const SkISize& dimen
sions, | 150 static sk_sp<SkImage> MakeFromPicture(sk_sp<SkPicture>, const SkISize& dimen
sions, |
| 142 const SkMatrix*, const SkPaint*); | 151 const SkMatrix*, const SkPaint*); |
| 143 | 152 |
| 144 static sk_sp<SkImage> MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkB
udgeted budgeted); | 153 static sk_sp<SkImage> MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkB
udgeted budgeted); |
| 145 | 154 |
| 146 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 155 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 147 | 156 |
| 148 int width() const { return fWidth; } | 157 int width() const { return fWidth; } |
| 149 int height() const { return fHeight; } | 158 int height() const { return fHeight; } |
| 150 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } | 159 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 SkBudgeted); | 457 SkBudgeted); |
| 449 | 458 |
| 450 const int fWidth; | 459 const int fWidth; |
| 451 const int fHeight; | 460 const int fHeight; |
| 452 const uint32_t fUniqueID; | 461 const uint32_t fUniqueID; |
| 453 | 462 |
| 454 typedef SkRefCnt INHERITED; | 463 typedef SkRefCnt INHERITED; |
| 455 }; | 464 }; |
| 456 | 465 |
| 457 #endif | 466 #endif |
| OLD | NEW |