OLD | NEW |
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 | 8 |
9 #include "GrPathRenderer.h" | 9 #include "GrPathRenderer.h" |
10 | 10 |
11 SK_DEFINE_INST_COUNT(GrPathRenderer) | 11 SK_DEFINE_INST_COUNT(GrPathRenderer) |
12 | 12 |
13 GrPathRenderer::GrPathRenderer() { | 13 GrPathRenderer::GrPathRenderer() { |
14 } | 14 } |
| 15 |
| 16 void GrPathRenderer::GetPathDevBounds(const SkPath& path, |
| 17 int devW, int devH, |
| 18 const SkMatrix& matrix, |
| 19 SkRect* bounds) { |
| 20 if (path.isInverseFillType()) { |
| 21 *bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH)); |
| 22 return; |
| 23 } |
| 24 *bounds = path.getBounds(); |
| 25 matrix.mapRect(bounds); |
| 26 } |
OLD | NEW |