chromium/third_party/skia/src/core/SkFDot6.h

/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkFDot6_DEFINED
#define SkFDot6_DEFINED

#include "include/core/SkScalar.h"
#include "include/private/base/SkFixed.h"
#include "include/private/base/SkMath.h"
#include "include/private/base/SkTo.h"

SkFDot6;

/* This uses the magic number approach suggested here:
 * http://stereopsis.com/sree/fpu2006.html and used in
 * _cairo_fixed_from_double. It does banker's rounding
 * (i.e. round to nearest even)
 */
inline SkFDot6 SkScalarRoundToFDot6(SkScalar x, int shift = 0)
{}

#define SK_FDot6One
#define SK_FDot6Half

#ifdef SK_DEBUG
    inline SkFDot6 SkIntToFDot6(int x) {}
#else
    #define SkIntToFDot6
#endif

#define SkFDot6Floor(x)
#define SkFDot6Ceil(x)
#define SkFDot6Round(x)

#define SkFixedToFDot6(x)

inline SkFixed SkFDot6ToFixed(SkFDot6 x) {}

#define SkScalarToFDot6(x)
#define SkFDot6ToScalar(x)
#define SkFDot6ToFloat

inline SkFixed SkFDot6Div(SkFDot6 a, SkFDot6 b) {}

#endif