| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 static sk_sp<SkImage> MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkB
udgeted budgeted); | 160 static sk_sp<SkImage> MakeTextureFromPixmap(GrContext*, const SkPixmap&, SkB
udgeted budgeted); |
| 161 | 161 |
| 162 ////////////////////////////////////////////////////////////////////////////
/////////////////// | 162 ////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 163 | 163 |
| 164 int width() const { return fWidth; } | 164 int width() const { return fWidth; } |
| 165 int height() const { return fHeight; } | 165 int height() const { return fHeight; } |
| 166 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } | 166 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } |
| 167 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } | 167 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } |
| 168 uint32_t uniqueID() const { return fUniqueID; } | 168 uint32_t uniqueID() const { return fUniqueID; } |
| 169 virtual bool isOpaque() const { return false; } | 169 SkAlphaType alphaType() const; |
| 170 bool isOpaque() const { return SkAlphaTypeIsOpaque(this->alphaType()); } |
| 170 | 171 |
| 171 /** | 172 /** |
| 172 * Extracts YUV planes from the SkImage and stores them in client-provided m
emory. The sizes | 173 * Extracts YUV planes from the SkImage and stores them in client-provided m
emory. The sizes |
| 173 * planes and rowBytes arrays are ordered [y, u, v]. | 174 * planes and rowBytes arrays are ordered [y, u, v]. |
| 174 */ | 175 */ |
| 175 bool readYUV8Planes(const SkISize[3], void* const planes[3], const size_t ro
wBytes[3], | 176 bool readYUV8Planes(const SkISize[3], void* const planes[3], const size_t ro
wBytes[3], |
| 176 SkYUVColorSpace) const; | 177 SkYUVColorSpace) const; |
| 177 | 178 |
| 178 #ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR | 179 #ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR |
| 179 SkShader* newShader(SkShader::TileMode, SkShader::TileMode, | 180 SkShader* newShader(SkShader::TileMode, SkShader::TileMode, |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 SkBudgeted); | 473 SkBudgeted); |
| 473 | 474 |
| 474 const int fWidth; | 475 const int fWidth; |
| 475 const int fHeight; | 476 const int fHeight; |
| 476 const uint32_t fUniqueID; | 477 const uint32_t fUniqueID; |
| 477 | 478 |
| 478 typedef SkRefCnt INHERITED; | 479 typedef SkRefCnt INHERITED; |
| 479 }; | 480 }; |
| 480 | 481 |
| 481 #endif | 482 #endif |
| OLD | NEW |