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

Side by Side Diff: tests/BlitRowTest.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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkGradientShader.h" 12 #include "SkGradientShader.h"
13 #include "SkRect.h" 13 #include "SkRect.h"
14 14
15 // these are in the same order as the SkBitmap::Config enum 15 // these are in the same order as the SkBitmap::Config enum
16 static const char* gConfigName[] = { 16 static const char* gConfigName[] = {
17 "None", "A1", "A8", "Index8", "565", "4444", "8888", "RLE_Index8" 17 "None", "A8", "Index8", "565", "4444", "8888"
18 }; 18 };
19 19
20 /** Returns -1 on success, else the x coord of the first bad pixel, return its 20 /** Returns -1 on success, else the x coord of the first bad pixel, return its
21 value in bad 21 value in bad
22 */ 22 */
23 typedef int (*Proc)(const void*, int width, uint32_t expected, uint32_t* bad); 23 typedef int (*Proc)(const void*, int width, uint32_t expected, uint32_t* bad);
24 24
25 static int proc_32(const void* ptr, int w, uint32_t expected, uint32_t* bad) { 25 static int proc_32(const void* ptr, int w, uint32_t expected, uint32_t* bad) {
26 const SkPMColor* addr = static_cast<const SkPMColor*>(ptr); 26 const SkPMColor* addr = static_cast<const SkPMColor*>(ptr);
27 for (int x = 0; x < w; x++) { 27 for (int x = 0; x < w; x++) {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 } 263 }
264 264
265 static void TestBlitRow(skiatest::Reporter* reporter) { 265 static void TestBlitRow(skiatest::Reporter* reporter) {
266 test_00_FF(reporter); 266 test_00_FF(reporter);
267 test_diagonal(reporter); 267 test_diagonal(reporter);
268 } 268 }
269 269
270 #include "TestClassDef.h" 270 #include "TestClassDef.h"
271 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow) 271 DEFINE_TESTCLASS("BlitRow", TestBlitRowClass, TestBlitRow)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698