diff options
author | reed <reed@google.com> | 2014-09-21 09:39:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-21 09:39:55 -0700 |
commit | 3716fd067a5621bb94a6cb08d72afec8bf3aceda (patch) | |
tree | cf5ceefd515bee37eec7404e3b86cd18a4d9ee80 /src/core/SkSurfacePriv.h | |
parent | 00a138c542bec58cac1a2ecc32b08c8312063ae5 (diff) |
introduce Props to surface (work in progress)
BUG=skia:
R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/551463004
Diffstat (limited to 'src/core/SkSurfacePriv.h')
-rw-r--r-- | src/core/SkSurfacePriv.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/SkSurfacePriv.h b/src/core/SkSurfacePriv.h new file mode 100644 index 0000000000..74d19a6df4 --- /dev/null +++ b/src/core/SkSurfacePriv.h @@ -0,0 +1,25 @@ +/* + * 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 SkSurfacePriv_DEFINED +#define SkSurfacePriv_DEFINED + +#include "SkSurfaceProps.h" + +static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) { + if (props) { + return *props; + } else { + return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType); + } +} + +static inline SkPixelGeometry SkSurfacePropsDefaultPixelGeometry() { + return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType).pixelGeometry(); +} + +#endif |