LEFT | RIGHT |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package draw | 5 package draw |
6 | 6 |
7 import ( | 7 import ( |
8 "color" | |
9 "image" | 8 "image" |
| 9 "image/color" |
10 "image/ycbcr" | 10 "image/ycbcr" |
11 "testing" | 11 "testing" |
12 ) | 12 ) |
13 | 13 |
14 const ( | 14 const ( |
15 dstw, dsth = 640, 480 | 15 dstw, dsth = 640, 480 |
16 srcw, srch = 400, 300 | 16 srcw, srch = 400, 300 |
17 ) | 17 ) |
18 | 18 |
19 // bench benchmarks drawing src and mask images onto a dst image with the | 19 // bench benchmarks drawing src and mask images onto a dst image with the |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 bench(b, color.RGBA64Model, color.RGBA64Model, color.AlphaModel, Over) | 198 bench(b, color.RGBA64Model, color.RGBA64Model, color.AlphaModel, Over) |
199 } | 199 } |
200 | 200 |
201 func BenchmarkGenericSrc(b *testing.B) { | 201 func BenchmarkGenericSrc(b *testing.B) { |
202 bench(b, color.RGBA64Model, color.RGBA64Model, nil, Src) | 202 bench(b, color.RGBA64Model, color.RGBA64Model, nil, Src) |
203 } | 203 } |
204 | 204 |
205 func BenchmarkGenericMaskSrc(b *testing.B) { | 205 func BenchmarkGenericMaskSrc(b *testing.B) { |
206 bench(b, color.RGBA64Model, color.RGBA64Model, color.AlphaModel, Src) | 206 bench(b, color.RGBA64Model, color.RGBA64Model, color.AlphaModel, Src) |
207 } | 207 } |
LEFT | RIGHT |