GrPath.h revision 32184d81629e39809bb9e915286d8fe971a8ed68
1/*
2 * Copyright 2012 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#ifndef GrPath_DEFINED
9#define GrPath_DEFINED
10
11#include "GrResource.h"
12#include "SkRect.h"
13#include "SkStrokeRec.h"
14
15class GrPath : public GrResource {
16public:
17    SK_DECLARE_INST_COUNT(GrPath);
18
19    GrPath(GrGpu* gpu, bool isWrapped, const SkStrokeRec& stroke)
20        : INHERITED(gpu, isWrapped),
21          fStroke(stroke) {
22    }
23
24    const SkRect& getBounds() const { return fBounds; }
25
26    const SkStrokeRec& getStroke() const { return fStroke; }
27
28protected:
29    SkRect fBounds;
30    SkStrokeRec fStroke;
31
32private:
33    typedef GrResource INHERITED;
34};
35
36#endif
37