| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright 2011 Google Inc. |    2  * Copyright 2011 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 "Benchmark.h" |    8 #include "Benchmark.h" | 
|    9 #include "SkBitmap.h" |    9 #include "SkBitmap.h" | 
|   10 #include "SkCanvas.h" |   10 #include "SkCanvas.h" | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
|   37     for (int r = 0; r < 6; r++) { |   37     for (int r = 0; r < 6; r++) { | 
|   38         int rr = conv6ToByte(r); |   38         int rr = conv6ToByte(r); | 
|   39         for (int g = 0; g < 6; g++) { |   39         for (int g = 0; g < 6; g++) { | 
|   40             int gg = conv6ToByte(g); |   40             int gg = conv6ToByte(g); | 
|   41             for (int b = 0; b < 6; b++) { |   41             for (int b = 0; b < 6; b++) { | 
|   42                 int bb = conv6ToByte(b); |   42                 int bb = conv6ToByte(b); | 
|   43                 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb); |   43                 *colors++ = SkPreMultiplyARGB(0xFF, rr, gg, bb); | 
|   44             } |   44             } | 
|   45         } |   45         } | 
|   46     } |   46     } | 
|   47     SkColorTable* ctable = new SkColorTable(storage, 216, aType); |   47     SkColorTable* ctable = new SkColorTable(storage, 216); | 
|   48     dst->allocPixels(SkImageInfo::Make(src.width(), src.height(), kIndex_8_SkCol
     orType, aType), |   48     dst->allocPixels(SkImageInfo::Make(src.width(), src.height(), kIndex_8_SkCol
     orType, aType), | 
|   49                      NULL, ctable); |   49                      NULL, ctable); | 
|   50     ctable->unref(); |   50     ctable->unref(); | 
|   51  |   51  | 
|   52     SkAutoLockPixels alps(src); |   52     SkAutoLockPixels alps(src); | 
|   53     SkAutoLockPixels alpd(*dst); |   53     SkAutoLockPixels alpd(*dst); | 
|   54  |   54  | 
|   55     for (int y = 0; y < src.height(); y++) { |   55     for (int y = 0; y < src.height(); y++) { | 
|   56         const SkPMColor* srcP = src.getAddr32(0, y); |   56         const SkPMColor* srcP = src.getAddr32(0, y); | 
|   57         uint8_t* dstP = dst->getAddr8(0, y); |   57         uint8_t* dstP = dst->getAddr8(0, y); | 
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  370 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t
     rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); ) |  370 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kOpaque_SkAlphaType, t
     rue, false, kScale_Flag | kRotate_Flag | kBilerp_Flag); ) | 
|  371  |  371  | 
|  372 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f
     alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); ) |  372 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f
     alse, false, kScale_Flag | kBilerp_Flag | kBicubic_Flag); ) | 
|  373 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f
     alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); ) |  373 DEF_BENCH( return new FilterBitmapBench(kN32_SkColorType, kPremul_SkAlphaType, f
     alse, false, kScale_Flag | kRotate_Flag | kBilerp_Flag | kBicubic_Flag); ) | 
|  374  |  374  | 
|  375 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon} |  375 // source alpha tests -> S32A_Opaque_BlitRow32_{arm,neon} | 
|  376 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou
     rceAlpha, kN32_SkColorType); ) |  376 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kOpaque_Sou
     rceAlpha, kN32_SkColorType); ) | 
|  377 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen
     t_SourceAlpha, kN32_SkColorType); ) |  377 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTransparen
     t_SourceAlpha, kN32_SkColorType); ) | 
|  378 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes
     _SourceAlpha, kN32_SkColorType); ) |  378 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kTwoStripes
     _SourceAlpha, kN32_SkColorType); ) | 
|  379 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip
     es_SourceAlpha, kN32_SkColorType); ) |  379 DEF_BENCH( return new SourceAlphaBitmapBench(SourceAlphaBitmapBench::kThreeStrip
     es_SourceAlpha, kN32_SkColorType); ) | 
| OLD | NEW |