Chromium Code Reviews| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 /** | 135 /** |
| 136 * Create a new image by copying the pixels from the specified y, u, v text ures. The data | 136 * Create a new image by copying the pixels from the specified y, u, v text ures. The data |
| 137 * from the textures is immediately ingested into the image and the texture s can be modified or | 137 * from the textures is immediately ingested into the image and the texture s can be modified or |
| 138 * deleted after the function returns. The image will have the dimensions o f the y texture. | 138 * deleted after the function returns. The image will have the dimensions o f the y texture. |
| 139 */ | 139 */ |
| 140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, | 140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, |
| 141 const GrBackendObject yuvTextureHandl es[3], | 141 const GrBackendObject yuvTextureHandl es[3], |
| 142 const SkISize yuvSizes[3], | 142 const SkISize yuvSizes[3], |
| 143 GrSurfaceOrigin); | 143 GrSurfaceOrigin); |
| 144 | 144 |
| 145 /** | |
| 146 * Ensures that an image is backed by a texture (when GrContext is non-null ). If no | |
| 147 * transformation is required, the returned image may be the same as the on e passed in. | |
| 148 * If the input image is from a different GrContext, this will fail. | |
| 149 */ | |
| 150 static SkImage* NewTextureImageFromImage(GrContext*, SkImage*); | |
|
reed1
2016/01/29 17:19:10
nit:
SkImage* newTextureImage(GrContext*) const;
| |
| 151 | |
| 145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, | 152 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, |
| 146 const SkMatrix*, const SkPaint*); | 153 const SkMatrix*, const SkPaint*); |
| 147 | 154 |
| 148 //////////////////////////////////////////////////////////////////////////// /////////////////// | 155 //////////////////////////////////////////////////////////////////////////// /////////////////// |
| 149 | 156 |
| 150 int width() const { return fWidth; } | 157 int width() const { return fWidth; } |
| 151 int height() const { return fHeight; } | 158 int height() const { return fHeight; } |
| 152 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } | 159 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } |
| 153 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } | 160 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } |
| 154 uint32_t uniqueID() const { return fUniqueID; } | 161 uint32_t uniqueID() const { return fUniqueID; } |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 | 336 |
| 330 private: | 337 private: |
| 331 const int fWidth; | 338 const int fWidth; |
| 332 const int fHeight; | 339 const int fHeight; |
| 333 const uint32_t fUniqueID; | 340 const uint32_t fUniqueID; |
| 334 | 341 |
| 335 typedef SkRefCnt INHERITED; | 342 typedef SkRefCnt INHERITED; |
| 336 }; | 343 }; |
| 337 | 344 |
| 338 #endif | 345 #endif |
| OLD | NEW |