diff options
author | 2014-06-12 17:40:00 -0700 | |
---|---|---|
committer | 2014-06-12 17:40:00 -0700 | |
commit | bfefc7c95fc0e8ebd5000c68f6d16e1a3ea0e71e (patch) | |
tree | 9e68e04fa38c4e28ac478786bfe6d402a3bff239 /gm/filterindiabox.cpp | |
parent | 9a8699f45c2bd8dac0c06829a06b6b244d19b6b2 (diff) |
hide Config in SkImageDecoder -- use SkColorType instead
patch from issue 334613003
TBR=scroggo
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/334793002
Diffstat (limited to 'gm/filterindiabox.cpp')
-rw-r--r-- | gm/filterindiabox.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gm/filterindiabox.cpp b/gm/filterindiabox.cpp index c03dfba293..4acb2c3a71 100644 --- a/gm/filterindiabox.cpp +++ b/gm/filterindiabox.cpp @@ -45,7 +45,6 @@ static void draw_row(SkCanvas* canvas, const SkBitmap& bm, const SkMatrix& mat, class FilterIndiaBoxGM : public skiagm::GM { void onOnceBeforeDraw() { - this->makeBitmap(); SkScalar cx = SkScalarHalf(fBM.width()); @@ -63,14 +62,11 @@ public: SkMatrix fMatrix[2]; SkString fName; - FilterIndiaBoxGM() - { + FilterIndiaBoxGM() { this->setBGColor(0xFFDDDDDD); } - FilterIndiaBoxGM(const char filename[]) - : fFilename(filename) - { + FilterIndiaBoxGM(const char filename[]) : fFilename(filename) { fName.printf("filterindiabox"); } @@ -88,7 +84,6 @@ protected: } virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { - canvas->translate(10, 10); for (size_t i = 0; i < SK_ARRAY_COUNT(fMatrix); ++i) { SkSize size = computeSize(fBM, fMatrix[i]); @@ -120,8 +115,7 @@ protected: } if (codec) { stream.rewind(); - codec->decode(&stream, &fBM, SkBitmap::kARGB_8888_Config, - SkImageDecoder::kDecodePixels_Mode); + codec->decode(&stream, &fBM, kN32_SkColorType, SkImageDecoder::kDecodePixels_Mode); SkDELETE(codec); } else { fBM.allocN32Pixels(1, 1); |