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

Side by Side Diff: include/core/SkImage.h

Issue 409653003: Now able to set the localMatrix when creating a SkShader from a SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Corrects warnings in windows build Created 6 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
« no previous file with comments | « no previous file | src/image/SkImage.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 SkImage_DEFINED 8 #ifndef SkImage_DEFINED
9 #define SkImage_DEFINED 9 #define SkImage_DEFINED
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 int height() const { return fHeight; } 51 int height() const { return fHeight; }
52 uint32_t uniqueID() const { return fUniqueID; } 52 uint32_t uniqueID() const { return fUniqueID; }
53 53
54 /** 54 /**
55 * Return the GrTexture that stores the image pixels. Calling getTexture 55 * Return the GrTexture that stores the image pixels. Calling getTexture
56 * does not affect the reference count of the GrTexture object. 56 * does not affect the reference count of the GrTexture object.
57 * Will return NULL if the image does not use a texture. 57 * Will return NULL if the image does not use a texture.
58 */ 58 */
59 GrTexture* getTexture(); 59 GrTexture* getTexture();
60 60
61 virtual SkShader* newShader(SkShader::TileMode, SkShader::TileMode) const; 61 virtual SkShader* newShader(SkShader::TileMode,
62 SkShader::TileMode,
63 const SkMatrix* localMatrix = NULL) const;
62 64
63 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); 65 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*);
64 66
65 /** 67 /**
66 * Draw the image, cropped to the src rect, to the dst rect of a canvas. 68 * Draw the image, cropped to the src rect, to the dst rect of a canvas.
67 * If src is larger than the bounds of the image, the rest of the image is 69 * If src is larger than the bounds of the image, the rest of the image is
68 * filled with transparent black pixels. 70 * filled with transparent black pixels.
69 * 71 *
70 * See SkCanvas::drawBitmapRectToRect for similar behavior. 72 * See SkCanvas::drawBitmapRectToRect for similar behavior.
71 */ 73 */
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 * On failure, false will be returned, and bitmap will unmodified. 131 * On failure, false will be returned, and bitmap will unmodified.
130 */ 132 */
131 // On ice for now: 133 // On ice for now:
132 // - should it respect the particular colortype/alphatype of the src 134 // - should it respect the particular colortype/alphatype of the src
133 // - should it have separate entrypoints for preallocated and not bitmaps? 135 // - should it have separate entrypoints for preallocated and not bitmaps?
134 // - isn't it enough to allow the caller to draw() the image into a canvas? 136 // - isn't it enough to allow the caller to draw() the image into a canvas?
135 bool readPixels(SkBitmap* bitmap, const SkIRect* subset = NULL) const; 137 bool readPixels(SkBitmap* bitmap, const SkIRect* subset = NULL) const;
136 }; 138 };
137 139
138 #endif 140 #endif
OLDNEW
« no previous file with comments | « no previous file | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698