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

Unified Diff: src/image/SkImage_Base.h

Issue 453613003: mark all SkImage methods const, so we can make it thread-safe (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Codec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 752afedc09e75bbf94f00d90906af418c5e63b7d..9542ba3b2e4659cffa90bc9c9defcb60b7d0eaae 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -14,9 +14,9 @@ class SkImage_Base : public SkImage {
public:
SkImage_Base(int width, int height) : INHERITED(width, height) {}
- virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) = 0;
+ virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const = 0;
virtual void onDrawRectToRect(SkCanvas*, const SkRect* src,
- const SkRect& dst, const SkPaint*) = 0;
+ const SkRect& dst, const SkPaint*) const = 0;
// Default impl calls onDraw
virtual bool onReadPixels(SkBitmap*, const SkIRect& subset) const;
@@ -25,7 +25,7 @@ public:
return NULL;
}
- virtual GrTexture* onGetTexture() { return NULL; }
+ virtual GrTexture* onGetTexture() const { return NULL; }
// return a read-only copy of the pixels. We promise to not modify them,
// but only inspect them (or encode them).
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698