add const to SkColorShader's asABitmap
git-svn-id: http://skia.googlecode.com/svn/trunk@900 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
a6d59f60aa
commit
8cad58624b
@ -47,10 +47,10 @@ public:
|
||||
virtual void shadeSpan16(int x, int y, uint16_t span[], int count);
|
||||
virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count);
|
||||
|
||||
virtual BitmapType asABitmap(SkBitmap* outTexture,
|
||||
virtual BitmapType asABitmap(SkBitmap* outTexture,
|
||||
SkMatrix* outMatrix,
|
||||
TileMode xy[2],
|
||||
SkScalar* twoPointRadialParams);
|
||||
TileMode xy[2],
|
||||
SkScalar* twoPointRadialParams) const;
|
||||
|
||||
virtual GradientType asAGradient(GradientInfo* info) const;
|
||||
|
||||
@ -59,8 +59,8 @@ protected:
|
||||
virtual void flatten(SkFlattenableWriteBuffer& );
|
||||
virtual Factory getFactory() { return CreateProc; }
|
||||
private:
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
||||
return SkNEW_ARGS(SkColorShader, (buffer));
|
||||
static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
|
||||
return SkNEW_ARGS(SkColorShader, (buffer));
|
||||
}
|
||||
SkColor fColor; // ignored if fInheritColor is true
|
||||
SkPMColor fPMColor; // cached after setContext()
|
||||
@ -69,7 +69,7 @@ private:
|
||||
SkBool8 fInheritColor;
|
||||
|
||||
// deferred allocation, used for asABitmap()
|
||||
SkPixelRef* fAsABitmapPixelRef;
|
||||
mutable SkPixelRef* fAsABitmapPixelRef;
|
||||
|
||||
typedef SkShader INHERITED;
|
||||
};
|
||||
|
@ -312,7 +312,7 @@ void SkColorShader::shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) {
|
||||
// if we had a asAColor method, that would be more efficient...
|
||||
SkShader::BitmapType SkColorShader::asABitmap(SkBitmap* bitmap, SkMatrix* matrix,
|
||||
TileMode modes[],
|
||||
SkScalar* twoPointRadialParams) {
|
||||
SkScalar* twoPointRadialParams) const {
|
||||
// we cache the pixelref, since its generateID is used in the texture cache
|
||||
if (NULL == fAsABitmapPixelRef) {
|
||||
SkPMColor* storage = (SkPMColor*)sk_malloc_throw(sizeof(SkPMColor));
|
||||
|
Loading…
Reference in New Issue
Block a user