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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 | 147 |
148 //////////////////////////////////////////////////////////////////////////// /////////////////// | 148 //////////////////////////////////////////////////////////////////////////// /////////////////// |
149 | 149 |
150 int width() const { return fWidth; } | 150 int width() const { return fWidth; } |
151 int height() const { return fHeight; } | 151 int height() const { return fHeight; } |
152 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } | 152 SkISize dimensions() const { return SkISize::Make(fWidth, fHeight); } |
153 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } | 153 SkIRect bounds() const { return SkIRect::MakeWH(fWidth, fHeight); } |
154 uint32_t uniqueID() const { return fUniqueID; } | 154 uint32_t uniqueID() const { return fUniqueID; } |
155 virtual bool isOpaque() const { return false; } | 155 virtual bool isOpaque() const { return false; } |
156 | 156 |
157 bool asYUV8Planes(const SkISize[3], void* const planes[3], const size_t rowB ytes[3], | |
bsalomon
2016/01/26 16:23:48
One thing I wondered is whether this should take a
| |
158 SkYUVColorSpace); | |
159 | |
157 virtual SkShader* newShader(SkShader::TileMode, | 160 virtual SkShader* newShader(SkShader::TileMode, |
158 SkShader::TileMode, | 161 SkShader::TileMode, |
159 const SkMatrix* localMatrix = NULL) const; | 162 const SkMatrix* localMatrix = NULL) const; |
160 | 163 |
161 /** | 164 /** |
162 * If the image has direct access to its pixels (i.e. they are in local | 165 * If the image has direct access to its pixels (i.e. they are in local |
163 * RAM) return the (const) address of those pixels, and if not null, return | 166 * RAM) return the (const) address of those pixels, and if not null, return |
164 * the ImageInfo and rowBytes. The returned address is only valid while | 167 * the ImageInfo and rowBytes. The returned address is only valid while |
165 * the image object is in scope. | 168 * the image object is in scope. |
166 * | 169 * |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
329 | 332 |
330 private: | 333 private: |
331 const int fWidth; | 334 const int fWidth; |
332 const int fHeight; | 335 const int fHeight; |
333 const uint32_t fUniqueID; | 336 const uint32_t fUniqueID; |
334 | 337 |
335 typedef SkRefCnt INHERITED; | 338 typedef SkRefCnt INHERITED; |
336 }; | 339 }; |
337 | 340 |
338 #endif | 341 #endif |
OLD | NEW |