| 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 |
| 11 #include "SkFilterQuality.h" | 11 #include "SkFilterQuality.h" |
| 12 #include "SkImageInfo.h" | 12 #include "SkImageInfo.h" |
| 13 #include "SkImageEncoder.h" | 13 #include "SkImageEncoder.h" |
| 14 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
| 15 #include "SkScalar.h" | 15 #include "SkScalar.h" |
| 16 #include "SkShader.h" | 16 #include "SkShader.h" |
| 17 | 17 |
| 18 class SkData; | 18 class SkData; |
| 19 class SkCanvas; | 19 class SkCanvas; |
| 20 class SkColorTable; | 20 class SkColorTable; |
| 21 class SkImageGenerator; | 21 class SkImageGenerator; |
| 22 class SkPaint; | 22 class SkPaint; |
| 23 class SkPicture; |
| 23 class SkString; | 24 class SkString; |
| 24 class SkSurface; | 25 class SkSurface; |
| 25 class SkSurfaceProps; | 26 class SkSurfaceProps; |
| 26 class GrContext; | 27 class GrContext; |
| 27 class GrTexture; | 28 class GrTexture; |
| 28 | 29 |
| 29 /** | 30 /** |
| 30 * SkImage is an abstraction for drawing a rectagle of pixels, though the | 31 * SkImage is an abstraction for drawing a rectagle of pixels, though the |
| 31 * particular type of image could be actually storing its data on the GPU, or | 32 * particular type of image could be actually storing its data on the GPU, or |
| 32 * as drawing commands (picture or PDF or otherwise), ready to be played back | 33 * as drawing commands (picture or PDF or otherwise), ready to be played back |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 /** | 135 /** |
| 135 * 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 |
| 136 * 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 |
| 137 * 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. |
| 138 */ | 139 */ |
| 139 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, | 140 static SkImage* NewFromYUVTexturesCopy(GrContext*, SkYUVColorSpace, |
| 140 const GrBackendObject yuvTextureHandl
es[3], | 141 const GrBackendObject yuvTextureHandl
es[3], |
| 141 const SkISize yuvSizes[3], | 142 const SkISize yuvSizes[3], |
| 142 GrSurfaceOrigin); | 143 GrSurfaceOrigin); |
| 143 | 144 |
| 145 static SkImage* NewFromPicture(const SkPicture*, const SkISize& dimensions, |
| 146 const SkMatrix*, const SkPaint*); |
| 147 |
| 148 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 149 |
| 144 int width() const { return fWidth; } | 150 int width() const { return fWidth; } |
| 145 int height() const { return fHeight; } | 151 int height() const { return fHeight; } |
| 146 uint32_t uniqueID() const { return fUniqueID; } | 152 uint32_t uniqueID() const { return fUniqueID; } |
| 147 virtual bool isOpaque() const { return false; } | 153 virtual bool isOpaque() const { return false; } |
| 148 | 154 |
| 149 virtual SkShader* newShader(SkShader::TileMode, | 155 virtual SkShader* newShader(SkShader::TileMode, |
| 150 SkShader::TileMode, | 156 SkShader::TileMode, |
| 151 const SkMatrix* localMatrix = NULL) const; | 157 const SkMatrix* localMatrix = NULL) const; |
| 152 | 158 |
| 153 /** | 159 /** |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 293 |
| 288 private: | 294 private: |
| 289 const int fWidth; | 295 const int fWidth; |
| 290 const int fHeight; | 296 const int fHeight; |
| 291 const uint32_t fUniqueID; | 297 const uint32_t fUniqueID; |
| 292 | 298 |
| 293 typedef SkRefCnt INHERITED; | 299 typedef SkRefCnt INHERITED; |
| 294 }; | 300 }; |
| 295 | 301 |
| 296 #endif | 302 #endif |
| OLD | NEW |