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 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkBitmapCache.h" | 9 #include "SkBitmapCache.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return this->readPixels(pmap.info(), pmap.writable_addr(), pmap.rowBytes(),
srcX, srcY, chint); | 258 return this->readPixels(pmap.info(), pmap.writable_addr(), pmap.rowBytes(),
srcX, srcY, chint); |
259 } | 259 } |
260 | 260 |
261 #if SK_SUPPORT_GPU | 261 #if SK_SUPPORT_GPU |
262 #include "GrTextureToYUVPlanes.h" | 262 #include "GrTextureToYUVPlanes.h" |
263 #endif | 263 #endif |
264 | 264 |
265 #include "SkRGBAToYUV.h" | 265 #include "SkRGBAToYUV.h" |
266 | 266 |
267 bool SkImage::readYUV8Planes(const SkISize sizes[3], void* const planes[3], | 267 bool SkImage::readYUV8Planes(const SkISize sizes[3], void* const planes[3], |
268 const size_t rowBytes[3], SkYUVColorSpace colorSpac
e) { | 268 const size_t rowBytes[3], SkYUVColorSpace colorSpac
e) const { |
269 #if SK_SUPPORT_GPU | 269 #if SK_SUPPORT_GPU |
270 if (GrTexture* texture = as_IB(this)->peekTexture()) { | 270 if (GrTexture* texture = as_IB(this)->peekTexture()) { |
271 if (GrTextureToYUVPlanes(texture, sizes, planes, rowBytes, colorSpace))
{ | 271 if (GrTextureToYUVPlanes(texture, sizes, planes, rowBytes, colorSpace))
{ |
272 return true; | 272 return true; |
273 } | 273 } |
274 } | 274 } |
275 #endif | 275 #endif |
276 return SkRGBAToYUV(this, sizes, planes, rowBytes, colorSpace); | 276 return SkRGBAToYUV(this, sizes, planes, rowBytes, colorSpace); |
277 } | 277 } |
278 | 278 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk
AlphaType) { | 356 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk
AlphaType) { |
357 return nullptr; | 357 return nullptr; |
358 } | 358 } |
359 | 359 |
360 SkImage* SkImage::newTextureImage(GrContext*) const { | 360 SkImage* SkImage::newTextureImage(GrContext*) const { |
361 return nullptr; | 361 return nullptr; |
362 } | 362 } |
363 | 363 |
364 #endif | 364 #endif |
OLD | NEW |