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

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

Issue 19729007: Add SkImage->draw() call with src and dst rects. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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
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 21 matching lines...) Expand all
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 SkRect src, SkRect dst, const SkPaint*);
42 /** 44 /**
43 * Return an SkImage whose contents are those of the specified picture. Note: 45 * 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 46 * The picture itself is unmodified, and may continue to be used for recording
45 */ 47 */
46 extern SkImage* SkNewImageFromPicture(const SkPicture*); 48 extern SkImage* SkNewImageFromPicture(const SkPicture*);
47 49
48 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) { 50 static inline size_t SkImageMinRowBytes(const SkImage::Info& info) {
49 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType); 51 size_t rb = info.fWidth * SkImageBytesPerPixel(info.fColorType);
50 return SkAlign4(rb); 52 return SkAlign4(rb);
51 } 53 }
(...skipping 10 matching lines...) Expand all
62 // 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,
63 // 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.
64 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage); 66 extern GrTexture* SkTextureImageGetTexture(SkImage* textureImage);
65 67
66 // Update the texture wrapped by an image created with NewTexture. This 68 // 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 69 // is called when a surface and image share the same GrTexture and the
68 // surface needs to perform a copy-on-write 70 // surface needs to perform a copy-on-write
69 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture); 71 extern void SkTextureImageSetTexture(SkImage* image, GrTexture* texture);
70 72
71 #endif 73 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698