Chromium Code Reviews| Index: src/gpu/GrPaintStyle.h |
| diff --git a/src/gpu/GrPaintStyle.h b/src/gpu/GrPaintStyle.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..26595d0d8c880b83f43a6073d2be3b02359850be |
| --- /dev/null |
| +++ b/src/gpu/GrPaintStyle.h |
| @@ -0,0 +1,39 @@ |
| +/* |
| + * Copyright 2014 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#ifndef GrPaintStyle_DEFINED |
| +#define GrPaintStyle_DEFINED |
| + |
| +#include "SkStrokeRec.h" |
| +#include "SkPathEffect.h" |
| + |
| +class GrPaintStyle { |
|
bsalomon
2014/06/04 19:05:05
I dunno about PaintStyle... it's more about stylin
robertphillips
2014/06/04 19:33:01
I also find PaintStyle less then intuitive:
GrGeo
egdaniel
2014/06/04 19:34:30
It should be changed but I think Path is too speci
egdaniel
2014/06/05 17:18:15
Changed to GrStrokeInfo
|
| +public: |
| + GrPaintStyle() : fStroke(NULL), fDashInfo(NULL) {} |
| + |
| + void setStrokeRec(SkStrokeRec* stroke) { |
| + fStroke = stroke; |
| + } |
| + |
| + bool hasStrokeRec() const { return NULL != fStroke; } |
| + |
| + SkStrokeRec* getStrokeRec() const { return fStroke; } |
| + |
| + void setDashInfo(SkPathEffect::DashInfo* dashInfo) { |
| + fDashInfo = dashInfo; |
| + } |
| + |
| + bool hasDashInfo() const { return NULL != fDashInfo; } |
| + |
| + const SkPathEffect::DashInfo* getDashInfo() const { return fDashInfo; } |
| + |
| +private: |
| + SkStrokeRec* fStroke; |
|
bsalomon
2014/06/04 19:05:05
Can we do this in a safer way (not raw ptrs) witho
egdaniel
2014/06/05 17:18:15
The SkStrokeRec and DashInfo are now stored inside
|
| + SkPathEffect::DashInfo* fDashInfo; |
| +}; |
| + |
| +#endif |