blob: 1f53e84057e7ef87d71ab4ed1eaabce93cf89f70 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
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 */
bsalomon@google.com30085192011-08-19 15:42:31 +00007
bsalomon@google.comffca4002011-02-22 20:34:01 +00008#include "GrPathRenderer.h"
9
bsalomon@google.comc2099d22012-03-02 21:26:50 +000010GrPathRenderer::GrPathRenderer() {
tomhudson@google.comd22b6e42011-06-24 15:53:40 +000011}
bsalomon@google.com1dd9baa2013-05-20 16:49:06 +000012
13void GrPathRenderer::GetPathDevBounds(const SkPath& path,
14 int devW, int devH,
15 const SkMatrix& matrix,
16 SkRect* bounds) {
17 if (path.isInverseFillType()) {
18 *bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH));
19 return;
20 }
21 *bounds = path.getBounds();
22 matrix.mapRect(bounds);
23}