Line data Source code
1 : /*
2 : * Copyright 2011 Google Inc.
3 : *
4 : * Use of this source code is governed by a BSD-style license that can be
5 : * found in the LICENSE file.
6 : */
7 :
8 : #include "GrPathRenderer.h"
9 :
10 0 : GrPathRenderer::GrPathRenderer() {
11 0 : }
12 :
13 0 : void GrPathRenderer::GetPathDevBounds(const SkPath& path,
14 : int devW, int devH,
15 : const SkMatrix& matrix,
16 : SkRect* bounds) {
17 0 : if (path.isInverseFillType()) {
18 0 : *bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH));
19 0 : return;
20 : }
21 0 : *bounds = path.getBounds();
22 0 : matrix.mapRect(bounds);
23 : }
|