blob: 3dcedf9f7cf05a446577ffd22d5e328492c8bcd7 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
bsalomon@google.com30085192011-08-19 15:42:31 +00008
bsalomon@google.comffca4002011-02-22 20:34:01 +00009#include "GrPathRenderer.h"
10
bsalomon@google.comc2099d22012-03-02 21:26:50 +000011GrPathRenderer::GrPathRenderer() {
tomhudson@google.comd22b6e42011-06-24 15:53:40 +000012}
bsalomon@google.com1dd9baa2013-05-20 16:49:06 +000013
14void GrPathRenderer::GetPathDevBounds(const SkPath& path,
15 int devW, int devH,
16 const SkMatrix& matrix,
17 SkRect* bounds) {
18 if (path.isInverseFillType()) {
19 *bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH));
20 return;
21 }
22 *bounds = path.getBounds();
23 matrix.mapRect(bounds);
24}