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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 83093005: remove kA1_Config, as it is no longer supported (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« src/utils/debugger/SkObjectParser.cpp ('K') | « tests/BlitRowTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Create a fake ImageDecoder to test setPrefConfigTable for 142 // Create a fake ImageDecoder to test setPrefConfigTable for
143 // backwards compatibility. 143 // backwards compatibility.
144 class PrefConfigTestingImageDecoder : public SkImageDecoder { 144 class PrefConfigTestingImageDecoder : public SkImageDecoder {
145 public: 145 public:
146 void testPrefConfigTable(skiatest::Reporter* reporter) { 146 void testPrefConfigTable(skiatest::Reporter* reporter) {
147 // Arbitrary list of Configs. The important thing about 147 // Arbitrary list of Configs. The important thing about
148 // the list is that each one is different, so we can test 148 // the list is that each one is different, so we can test
149 // to make sure the correct config is chosen. 149 // to make sure the correct config is chosen.
150 const SkBitmap::Config configs[] = { 150 const SkBitmap::Config configs[] = {
151 SkBitmap::kA1_Config, 151 SkBitmap::kA8_Config,
152 SkBitmap::kA8_Config, 152 SkBitmap::kA8_Config,
153 SkBitmap::kIndex8_Config, 153 SkBitmap::kIndex8_Config,
154 SkBitmap::kRGB_565_Config, 154 SkBitmap::kRGB_565_Config,
155 SkBitmap::kARGB_4444_Config, 155 SkBitmap::kARGB_4444_Config,
156 SkBitmap::kARGB_8888_Config, 156 SkBitmap::kARGB_8888_Config,
157 }; 157 };
158 this->setPrefConfigTable(configs); 158 this->setPrefConfigTable(configs);
159 REPORTER_ASSERT(reporter, configs[0] == this->getPrefConfig(kIndex_SrcDe pth, false)); 159 REPORTER_ASSERT(reporter, configs[0] == this->getPrefConfig(kIndex_SrcDe pth, false));
160 REPORTER_ASSERT(reporter, configs[1] == this->getPrefConfig(kIndex_SrcDe pth, true)); 160 REPORTER_ASSERT(reporter, configs[1] == this->getPrefConfig(kIndex_SrcDe pth, true));
161 REPORTER_ASSERT(reporter, configs[4] == this->getPrefConfig(k32Bit_SrcDe pth, false)); 161 REPORTER_ASSERT(reporter, configs[4] == this->getPrefConfig(k32Bit_SrcDe pth, false));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 test_pref_config_table(reporter); 267 test_pref_config_table(reporter);
268 #ifdef SK_DEBUG 268 #ifdef SK_DEBUG
269 test_stream_life(); 269 test_stream_life();
270 test_row_proc_choice(); 270 test_row_proc_choice();
271 #endif 271 #endif
272 } 272 }
273 273
274 #include "TestClassDef.h" 274 #include "TestClassDef.h"
275 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass, 275 DEFINE_TESTCLASS("ImageDecoding", ImageDecodingTestClass,
276 test_imageDecodingTests) 276 test_imageDecodingTests)
OLDNEW
« src/utils/debugger/SkObjectParser.cpp ('K') | « tests/BlitRowTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698