3 * Copyright 2006 The Android Open Source Project
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
10 #ifndef SkUnitMapper_DEFINED
11 #define SkUnitMapper_DEFINED
16 #include "SkFlattenable.h"
18 class SkUnitMapper : public SkFlattenable {
20 SK_DECLARE_INST_COUNT(SkUnitMapper)
24 /** Given a value in [0..0xFFFF], return a value in the same range.
26 virtual uint16_t mapUnit16(uint16_t x) = 0;
28 SK_DEFINE_FLATTENABLE_TYPE(SkUnitMapper)
31 SkUnitMapper(SkReadBuffer& rb) : SkFlattenable(rb) {}
34 typedef SkFlattenable INHERITED;