bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 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" |
commit-bot@chromium.org | fd03d4a | 2013-07-17 21:39:42 +0000 | [diff] [blame] | 12 | #include "SkRect.h" |
commit-bot@chromium.org | 32184d8 | 2013-10-09 15:14:18 +0000 | [diff] [blame] | 13 | #include "SkStrokeRec.h" |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 14 | |
| 15 | class GrPath : public GrResource { |
| 16 | public: |
robertphillips@google.com | 7fa1876 | 2012-09-11 13:02:31 +0000 | [diff] [blame] | 17 | SK_DECLARE_INST_COUNT(GrPath); |
| 18 | |
commit-bot@chromium.org | 32184d8 | 2013-10-09 15:14:18 +0000 | [diff] [blame] | 19 | GrPath(GrGpu* gpu, bool isWrapped, const SkStrokeRec& stroke) |
| 20 | : INHERITED(gpu, isWrapped), |
| 21 | fStroke(stroke) { |
| 22 | } |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 23 | |
commit-bot@chromium.org | fd03d4a | 2013-07-17 21:39:42 +0000 | [diff] [blame] | 24 | const SkRect& getBounds() const { return fBounds; } |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 25 | |
commit-bot@chromium.org | 32184d8 | 2013-10-09 15:14:18 +0000 | [diff] [blame] | 26 | const SkStrokeRec& getStroke() const { return fStroke; } |
| 27 | |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 28 | protected: |
commit-bot@chromium.org | fd03d4a | 2013-07-17 21:39:42 +0000 | [diff] [blame] | 29 | SkRect fBounds; |
commit-bot@chromium.org | 32184d8 | 2013-10-09 15:14:18 +0000 | [diff] [blame] | 30 | SkStrokeRec fStroke; |
bsalomon@google.com | 64aef2b | 2012-06-11 15:36:13 +0000 | [diff] [blame] | 31 | |
| 32 | private: |
| 33 | typedef GrResource INHERITED; |
| 34 | }; |
| 35 | |
| 36 | #endif |