diff options
author | 2014-08-06 16:30:51 -0400 | |
---|---|---|
committer | 2014-08-06 16:30:51 -0400 | |
commit | 27fb94999b8eec448423884e1d071e563c4c95d9 (patch) | |
tree | 47d468b303a1a081411a7dd776c3f3593f6508f6 /src/core/SkPaintOptionsAndroid.cpp | |
parent | 8560cd5396f8902322471b49ac33aa849659228e (diff) |
Remove SkPaintOptionsAndroid
Review URL: https://codereview.chromium.org/447873003
Diffstat (limited to 'src/core/SkPaintOptionsAndroid.cpp')
-rw-r--r-- | src/core/SkPaintOptionsAndroid.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/core/SkPaintOptionsAndroid.cpp b/src/core/SkPaintOptionsAndroid.cpp deleted file mode 100644 index df71ca87a4..0000000000 --- a/src/core/SkPaintOptionsAndroid.cpp +++ /dev/null @@ -1,43 +0,0 @@ - -/* - * Copyright 2012 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. - */ - -#include "SkPaintOptionsAndroid.h" -#include "SkReadBuffer.h" -#include "SkWriteBuffer.h" -#include "SkTDict.h" -#include "SkThread.h" -#include <cstring> - -SkLanguage SkLanguage::getParent() const { - SkASSERT(!fTag.isEmpty()); - const char* tag = fTag.c_str(); - - // strip off the rightmost "-.*" - const char* parentTagEnd = strrchr(tag, '-'); - if (parentTagEnd == NULL) { - return SkLanguage(); - } - size_t parentTagLen = parentTagEnd - tag; - return SkLanguage(tag, parentTagLen); -} - -void SkPaintOptionsAndroid::flatten(SkWriteBuffer& buffer) const { - buffer.writeUInt(fFontVariant); - buffer.writeString(fLanguage.getTag().c_str()); - // to maintain picture compatibility for the old fUseFontFallbacks variable - buffer.writeBool(false); -} - -void SkPaintOptionsAndroid::unflatten(SkReadBuffer& buffer) { - fFontVariant = (FontVariant)buffer.readUInt(); - SkString tag; - buffer.readString(&tag); - fLanguage = SkLanguage(tag); - // to maintain picture compatibility for the old fUseFontFallbacks variable - buffer.readBool(); -} |