2 * Copyright 2015 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef sk_types_priv_DEFINED
9 #define sk_types_priv_DEFINED
11 #include "include/c/sk_types.h"
17 static inline const SkPaint& AsPaint(const sk_paint_t& cpaint) {
18 return reinterpret_cast<const SkPaint&>(cpaint);
21 static inline const SkPaint* AsPaint(const sk_paint_t* cpaint) {
22 return reinterpret_cast<const SkPaint*>(cpaint);
25 static inline SkPaint* AsPaint(sk_paint_t* cpaint) {
26 return reinterpret_cast<SkPaint*>(cpaint);
29 static inline SkMaskFilter* AsMaskFilter(sk_maskfilter_t* cfilter) {
30 return reinterpret_cast<SkMaskFilter*>(cfilter);
33 static inline sk_maskfilter_t* ToMaskFilter(SkMaskFilter* filter) {
34 return reinterpret_cast<sk_maskfilter_t*>(filter);
37 static inline SkShader* AsShader(sk_shader_t* cshader) {
38 return reinterpret_cast<SkShader*>(cshader);