Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: src/image/SkImagePriv.h

Issue 13195002: Unit test improvements to fully validate the SkImage contract (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/image/SkImage_Picture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) { 48 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) {
49 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType); 49 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType);
50 return SkAlign4(rb); 50 return SkAlign4(rb);
51 } 51 }
52 52
53 // Given an image created from SkNewImageFromBitmap, return its pixelref. This 53 // Given an image created from SkNewImageFromBitmap, return its pixelref. This
54 // may be called to see if the surface and the image share the same pixelref, 54 // may be called to see if the surface and the image share the same pixelref,
55 // in which case the surface may need to perform a copy-on-write. 55 // in which case the surface may need to perform a copy-on-write.
56 extern SkPixelRef* SkBitmapImageGetPixelRef(SkImage* rasterImage); 56 extern SkPixelRef* SkBitmapImageGetPixelRef(SkImage* rasterImage);
57 57
58 // Given an image created with NewPicture, return its SkPicture.
59 extern SkPicture* SkPictureImageGetPicture(SkImage* pictureImage);
60
58 // Given an image created with NewTexture, return its GrTexture. This 61 // Given an image created with NewTexture, return its GrTexture. This
59 // may be called to see if the surface and the image share the same GrTexture, 62 // may be called to see if the surface and the image share the same GrTexture,
60 // in which case the surface may need to perform a copy-on-write. 63 // in which case the surface may need to perform a copy-on-write.
61 extern GrTexture* SkTextureImageGetTexture(SkImage* rasterImage); 64 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage);
62 65
63 // Update the texture wrapped by an image created with NewTexture. This 66 // Update the texture wrapped by an image created with NewTexture. This
64 // is called when a surface and image share the same GrTexture and the 67 // is called when a surface and image share the same GrTexture and the
65 // surface needs to perform a copy-on-write 68 // surface needs to perform a copy-on-write
66 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); 69 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture);
67 70
68 #endif 71 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/image/SkImage_Picture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698