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 SkImage_DEFINED | 8 #ifndef SkImage_DEFINED |
9 #define SkImage_DEFINED | 9 #define SkImage_DEFINED |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 * Return the GrTexture that stores the image pixels. Calling getTexture | 75 * Return the GrTexture that stores the image pixels. Calling getTexture |
76 * does not affect the reference count of the GrTexture object. | 76 * does not affect the reference count of the GrTexture object. |
77 * Will return NULL if the image does not use a texture. | 77 * Will return NULL if the image does not use a texture. |
78 */ | 78 */ |
79 GrTexture* getTexture(); | 79 GrTexture* getTexture(); |
80 | 80 |
81 SkShader* newShaderClamp() const; | 81 SkShader* newShaderClamp() const; |
82 SkShader* newShader(SkShader::TileMode, SkShader::TileMode) const; | 82 SkShader* newShader(SkShader::TileMode, SkShader::TileMode) const; |
83 | 83 |
84 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); | 84 void draw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*); |
85 | 85 void draw(SkCanvas*, SkRect src, SkRect dst, const SkPaint*); |
Justin Novosad
2013/07/18 21:54:37
Use "const SkRect&" for src and dst
reed1
2013/07/19 14:03:45
How about
const SkRect* src
const SkRect& dst
So
| |
86 | |
86 /** | 87 /** |
87 * Encode the image's pixels and return the result as a new SkData, which | 88 * Encode the image's pixels and return the result as a new SkData, which |
88 * the caller must manage (i.e. call unref() when they are done). | 89 * the caller must manage (i.e. call unref() when they are done). |
89 * | 90 * |
90 * If the image type cannot be encoded, or the requested encoder type is | 91 * If the image type cannot be encoded, or the requested encoder type is |
91 * not supported, this will return NULL. | 92 * not supported, this will return NULL. |
92 */ | 93 */ |
93 SkData* encode(SkImageEncoder::Type t = SkImageEncoder::kPNG_Type, | 94 SkData* encode(SkImageEncoder::Type t = SkImageEncoder::kPNG_Type, |
94 int quality = 80) const; | 95 int quality = 80) const; |
95 | 96 |
(...skipping 11 matching lines...) Expand all Loading... | |
107 const int fWidth; | 108 const int fWidth; |
108 const int fHeight; | 109 const int fHeight; |
109 const uint32_t fUniqueID; | 110 const uint32_t fUniqueID; |
110 | 111 |
111 static uint32_t NextUniqueID(); | 112 static uint32_t NextUniqueID(); |
112 | 113 |
113 typedef SkRefCnt INHERITED; | 114 typedef SkRefCnt INHERITED; |
114 }; | 115 }; |
115 | 116 |
116 #endif | 117 #endif |
OLD | NEW |