summaryrefslogtreecommitdiffstats
path: root/cc/stubs/skia_utils.h
blob: d7b1fbfb03e533f82bed9d1739540164573c79e7 (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 cc {

inline SkScalar FloatToSkScalar(float f)
{
    return SkFloatToScalar(isfinite(f) ? f : 0);
}

}

#endif  // CC_STUBS_SKIAUTILS_H_