Index: src/image/SkImage_Gpu.cpp |
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp |
index 81114b0fe8d1dfa59a17a9f1c148b4ed7f93f35d..0918412e83c1decbb2bad6e9d26dc8501d73ce55 100644 |
--- a/src/image/SkImage_Gpu.cpp |
+++ b/src/image/SkImage_Gpu.cpp |
@@ -20,12 +20,13 @@ public: |
explicit SkImage_Gpu(const SkBitmap&); |
virtual ~SkImage_Gpu(); |
- virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) SK_OVERRIDE; |
- virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& dst, const SkPaint*) SK_OVERRIDE; |
- virtual GrTexture* onGetTexture() SK_OVERRIDE; |
+ virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const SK_OVERRIDE; |
+ virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& dst, |
+ const SkPaint*) const SK_OVERRIDE; |
+ virtual GrTexture* onGetTexture() const SK_OVERRIDE; |
virtual bool getROPixels(SkBitmap*) const SK_OVERRIDE; |
- GrTexture* getTexture() { return fBitmap.getTexture(); } |
+ GrTexture* getTexture() const { return fBitmap.getTexture(); } |
virtual SkShader* onNewShader(SkShader::TileMode, |
SkShader::TileMode, |
@@ -54,17 +55,16 @@ SkShader* SkImage_Gpu::onNewShader(SkShader::TileMode tileX, |
return SkShader::CreateBitmapShader(fBitmap, tileX, tileY, localMatrix); |
} |
-void SkImage_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, |
- const SkPaint* paint) { |
+void SkImage_Gpu::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint) const { |
canvas->drawBitmap(fBitmap, x, y, paint); |
} |
void SkImage_Gpu::onDrawRectToRect(SkCanvas* canvas, const SkRect* src, const SkRect& dst, |
- const SkPaint* paint) { |
+ const SkPaint* paint) const { |
canvas->drawBitmapRectToRect(fBitmap, src, dst, paint); |
} |
-GrTexture* SkImage_Gpu::onGetTexture() { |
+GrTexture* SkImage_Gpu::onGetTexture() const { |
return fBitmap.getTexture(); |
} |