| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2015 Google Inc. | 2  * Copyright 2015 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 "SubsetZoomBench.h" | 8 #include "SubsetZoomBench.h" | 
| 9 #include "SubsetBenchPriv.h" | 9 #include "SubsetBenchPriv.h" | 
| 10 #include "SkData.h" | 10 #include "SkData.h" | 
| 11 #include "SkCodec.h" | 11 #include "SkCodec.h" | 
| 12 #include "SkImageDecoder.h" | 12 #include "SkImageDecoder.h" | 
| 13 #include "SkOSFile.h" | 13 #include "SkOSFile.h" | 
|  | 14 #include "SkScanlineDecoder.h" | 
| 14 #include "SkStream.h" | 15 #include "SkStream.h" | 
| 15 | 16 | 
| 16 /* | 17 /* | 
| 17  * | 18  * | 
| 18  * This benchmark is designed to test the performance of subset decoding. | 19  * This benchmark is designed to test the performance of subset decoding. | 
| 19  * Choose subsets to mimic a user zooming in or out on a photo. | 20  * Choose subsets to mimic a user zooming in or out on a photo. | 
| 20  * | 21  * | 
| 21  */ | 22  */ | 
| 22 | 23 | 
| 23 SubsetZoomBench::SubsetZoomBench(const SkString& path, | 24 SubsetZoomBench::SubsetZoomBench(const SkString& path, | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 109                 SkBitmap bitmap; | 110                 SkBitmap bitmap; | 
| 110                 SkIRect rect = SkIRect::MakeXYWH(subsetStartX, subsetStartY, sub
     setWidth, | 111                 SkIRect rect = SkIRect::MakeXYWH(subsetStartX, subsetStartY, sub
     setWidth, | 
| 111                         subsetHeight); | 112                         subsetHeight); | 
| 112                 decoder->decodeSubset(&bitmap, rect, fColorType); | 113                 decoder->decodeSubset(&bitmap, rect, fColorType); | 
| 113                 w <<= 1; | 114                 w <<= 1; | 
| 114                 h <<= 1; | 115                 h <<= 1; | 
| 115             } while (w < 2 * width || h < 2 * height); | 116             } while (w < 2 * width || h < 2 * height); | 
| 116         } | 117         } | 
| 117     } | 118     } | 
| 118 } | 119 } | 
| OLD | NEW | 
|---|