Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: include/core/SkUnitMapper.h

Issue 287063009: Revert of remove unused (by clients) SkUnitMapper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkShader.h ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkUnitMapper.h
diff --git a/include/core/SkUnitMapper.h b/include/core/SkUnitMapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..46f6eddd709e0238b9b060d2ca6ae5da9ebe9025
--- /dev/null
+++ b/include/core/SkUnitMapper.h
@@ -0,0 +1,37 @@
+
+/*
+ * 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 SkUnitMapper_DEFINED
+#define SkUnitMapper_DEFINED
+
+#include "SkRefCnt.h"
+#include "SkScalar.h"
+
+#include "SkFlattenable.h"
+
+class SkUnitMapper : public SkFlattenable {
+public:
+ SK_DECLARE_INST_COUNT(SkUnitMapper)
+
+ SkUnitMapper() {}
+
+ /** Given a value in [0..0xFFFF], return a value in the same range.
+ */
+ virtual uint16_t mapUnit16(uint16_t x) = 0;
+
+ SK_DEFINE_FLATTENABLE_TYPE(SkUnitMapper)
+
+protected:
+ SkUnitMapper(SkReadBuffer& rb) : SkFlattenable(rb) {}
+
+private:
+ typedef SkFlattenable INHERITED;
+};
+
+#endif
« no previous file with comments | « include/core/SkShader.h ('k') | include/effects/SkGradientShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698