summaryrefslogtreecommitdiffstats
path: root/cc/stubs/SkiaUtils.h
blob: f5ceb4eb9854b631b1753df5a08455bc17897153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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_