diff options
author | reed <reed@google.com> | 2015-03-19 08:31:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-19 08:31:14 -0700 |
commit | 3ef71e343bf075888fb50892350390b4dd47de24 (patch) | |
tree | d4765ef144928600322cf21bdb41b37f05a55697 /tests/DrawBitmapRectTest.cpp | |
parent | 647211f1243f2dc925588e75038be49cad7b5431 (diff) |
guarded change to SkImageGenerator to make getInfo() const
BUG=skia:
Review URL: https://codereview.chromium.org/1017293002
Diffstat (limited to 'tests/DrawBitmapRectTest.cpp')
-rw-r--r-- | tests/DrawBitmapRectTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp index 9c0c6839b2..bde0095df9 100644 --- a/tests/DrawBitmapRectTest.cpp +++ b/tests/DrawBitmapRectTest.cpp @@ -20,14 +20,14 @@ // A BitmapFactory that always fails when asked to return pixels. class FailureImageGenerator : public SkImageGenerator { public: - FailureImageGenerator() { } - virtual ~FailureImageGenerator() { } - + FailureImageGenerator() : SkImageGenerator(SkImageInfo::MakeN32Premul(100, 100)) {} protected: +#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { *info = SkImageInfo::MakeN32Premul(100, 100); return true; } +#endif // default onGetPixels() returns kUnimplemented, which is what we want. }; |