diff options
Diffstat (limited to 'cc/stubs/SkiaUtils.h')
-rw-r--r-- | cc/stubs/SkiaUtils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/stubs/SkiaUtils.h b/cc/stubs/SkiaUtils.h new file mode 100644 index 0000000..f5ceb4eb --- /dev/null +++ b/cc/stubs/SkiaUtils.h @@ -0,0 +1,17 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_STUBS_SKIAUTILS_H_ +#define CC_STUBS_SKIAUTILS_H_ + +namespace WebCore { + +inline SkScalar WebCoreFloatToSkScalar(float f) +{ + return SkFloatToScalar(isfinite(f) ? f : 0); +} + +} + +#endif // CC_STUBS_SKIAUTILS_H_ |