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 |
11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
12 #include "SkImage.h" | 12 #include "SkImage.h" |
13 | 13 |
14 class SkPicture; | 14 class SkPicture; |
15 | 15 |
16 extern SkBitmap::Config SkImageInfoToBitmapConfig(const SkImage::Info&, | 16 extern SkBitmap::Config SkImageInfoToBitmapConfig(const SkImage::Info&); |
17 bool* isOpaque); | |
18 | 17 |
19 extern int SkImageBytesPerPixel(SkImage::ColorType); | 18 extern int SkImageBytesPerPixel(SkImage::ColorType); |
20 | 19 |
21 extern bool SkBitmapToImageInfo(const SkBitmap&, SkImage::Info*); | 20 extern bool SkBitmapToImageInfo(const SkBitmap&, SkImage::Info*); |
22 | 21 |
23 // Call this if you explicitly want to use/share this pixelRef in the image | 22 // Call this if you explicitly want to use/share this pixelRef in the image |
24 extern SkImage* SkNewImageFromPixelRef(const SkImage::Info&, SkPixelRef*, | 23 extern SkImage* SkNewImageFromPixelRef(const SkImage::Info&, SkPixelRef*, |
25 size_t rowBytes); | 24 size_t rowBytes); |
26 | 25 |
27 /** | 26 /** |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // may be called to see if the surface and the image share the same GrTexture, | 64 // may be called to see if the surface and the image share the same GrTexture, |
66 // in which case the surface may need to perform a copy-on-write. | 65 // in which case the surface may need to perform a copy-on-write. |
67 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); | 66 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); |
68 | 67 |
69 // Update the texture wrapped by an image created with NewTexture. This | 68 // Update the texture wrapped by an image created with NewTexture. This |
70 // is called when a surface and image share the same GrTexture and the | 69 // is called when a surface and image share the same GrTexture and the |
71 // surface needs to perform a copy-on-write | 70 // surface needs to perform a copy-on-write |
72 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); | 71 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); |
73 | 72 |
74 #endif | 73 #endif |
OLD | NEW |