blob: 37dc9591a63deb5f2c809515ed9f49f99ac2c5b8 [file] [log] [blame]
bsalomon@google.com64aef2b2012-06-11 15:36:13 +00001/*
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"
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +000012#include "SkRect.h"
commit-bot@chromium.org32184d82013-10-09 15:14:18 +000013#include "SkStrokeRec.h"
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000014
15class GrPath : public GrResource {
16public:
robertphillips@google.com7fa18762012-09-11 13:02:31 +000017 SK_DECLARE_INST_COUNT(GrPath);
18
commit-bot@chromium.org32184d82013-10-09 15:14:18 +000019 GrPath(GrGpu* gpu, bool isWrapped, const SkStrokeRec& stroke)
20 : INHERITED(gpu, isWrapped),
21 fStroke(stroke) {
22 }
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000023
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +000024 const SkRect& getBounds() const { return fBounds; }
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000025
commit-bot@chromium.org32184d82013-10-09 15:14:18 +000026 const SkStrokeRec& getStroke() const { return fStroke; }
27
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000028protected:
commit-bot@chromium.orgfd03d4a2013-07-17 21:39:42 +000029 SkRect fBounds;
commit-bot@chromium.org32184d82013-10-09 15:14:18 +000030 SkStrokeRec fStroke;
bsalomon@google.com64aef2b2012-06-11 15:36:13 +000031
32private:
33 typedef GrResource INHERITED;
34};
35
36#endif