Home | History | Annotate | Download | only in gpu
      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 GrPathRenderer::GrPathRenderer() {
     11 }
     12 
     13 void 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 }
     24