aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/filterindiabox.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2014-06-12 17:40:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-12 17:40:00 -0700
commitbfefc7c95fc0e8ebd5000c68f6d16e1a3ea0e71e (patch)
tree9e68e04fa38c4e28ac478786bfe6d402a3bff239 /gm/filterindiabox.cpp
parent9a8699f45c2bd8dac0c06829a06b6b244d19b6b2 (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.cpp12
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);