| 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 SkImagePriv_DEFINED | 8 #ifndef SkImagePriv_DEFINED |
| 9 #define SkImagePriv_DEFINED | 9 #define SkImagePriv_DEFINED |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * | 32 * |
| 33 * If the bitmap's config cannot be converted into a corresponding | 33 * If the bitmap's config cannot be converted into a corresponding |
| 34 * SkImage::Info, or the bitmap's pixels cannot be accessed, this will return | 34 * SkImage::Info, or the bitmap's pixels cannot be accessed, this will return |
| 35 * NULL. | 35 * NULL. |
| 36 */ | 36 */ |
| 37 extern SkImage* SkNewImageFromBitmap(const SkBitmap&, bool canSharePixelRef); | 37 extern SkImage* SkNewImageFromBitmap(const SkBitmap&, bool canSharePixelRef); |
| 38 | 38 |
| 39 extern void SkImagePrivDrawPicture(SkCanvas*, SkPicture*, | 39 extern void SkImagePrivDrawPicture(SkCanvas*, SkPicture*, |
| 40 SkScalar x, SkScalar y, const SkPaint*); | 40 SkScalar x, SkScalar y, const SkPaint*); |
| 41 | 41 |
| 42 extern void SkImagePrivDrawPicture(SkCanvas*, SkPicture*, |
| 43 const SkRect*, const SkRect&, const SkPaint*)
; |
| 44 |
| 42 /** | 45 /** |
| 43 * Return an SkImage whose contents are those of the specified picture. Note: | 46 * Return an SkImage whose contents are those of the specified picture. Note: |
| 44 * The picture itself is unmodified, and may continue to be used for recording | 47 * The picture itself is unmodified, and may continue to be used for recording |
| 45 */ | 48 */ |
| 46 extern SkImage* SkNewImageFromPicture(const SkPicture*); | 49 extern SkImage* SkNewImageFromPicture(const SkPicture*); |
| 47 | 50 |
| 48 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) { | 51 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) { |
| 49 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType); | 52 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType); |
| 50 return SkAlign4(rb); | 53 return SkAlign4(rb); |
| 51 } | 54 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 62 // may be called to see if the surface and the image share the same GrTexture, | 65 // may be called to see if the surface and the image share the same GrTexture, |
| 63 // in which case the surface may need to perform a copy-on-write. | 66 // in which case the surface may need to perform a copy-on-write. |
| 64 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); | 67 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); |
| 65 | 68 |
| 66 // Update the texture wrapped by an image created with NewTexture. This | 69 // Update the texture wrapped by an image created with NewTexture. This |
| 67 // is called when a surface and image share the same GrTexture and the | 70 // is called when a surface and image share the same GrTexture and the |
| 68 // surface needs to perform a copy-on-write | 71 // surface needs to perform a copy-on-write |
| 69 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); | 72 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); |
| 70 | 73 |
| 71 #endif | 74 #endif |
| OLD | NEW |