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

Unified Diff: gm/filterindiabox.cpp

Issue 334793002: hide Config in SkImageDecoder -- use SkColorType instead (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning Created 6 years, 6 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 | « gm/filterbitmap.cpp ('k') | gm/gm_expectations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/filterindiabox.cpp
diff --git a/gm/filterindiabox.cpp b/gm/filterindiabox.cpp
index c03dfba2936a2c1c1631738035a470a7aa76df22..4acb2c3a71554119bf16dec986c9795adebb3b68 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);
« no previous file with comments | « gm/filterbitmap.cpp ('k') | gm/gm_expectations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698