aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPaintOptionsAndroid.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-09 22:47:33 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-09 22:47:33 +0000
commite55491d84632bc69d989be793e9709d941d173b4 (patch)
tree65a27be01e160ab30701ae39a0438872046815b5 /src/core/SkPaintOptionsAndroid.cpp
parent3a886ccf2a49757dba4e4cba8400bb9624112ec5 (diff)
Reverting 9083 & 9084 due to Android failures
git-svn-id: http://skia.googlecode.com/svn/trunk@9085 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPaintOptionsAndroid.cpp')
-rw-r--r--src/core/SkPaintOptionsAndroid.cpp65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/core/SkPaintOptionsAndroid.cpp b/src/core/SkPaintOptionsAndroid.cpp
deleted file mode 100644
index ef9375ece6..0000000000
--- a/src/core/SkPaintOptionsAndroid.cpp
+++ /dev/null
@@ -1,65 +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.
- */
-
-#ifdef SK_BUILD_FOR_ANDROID
-
-#include "SkPaintOptionsAndroid.h"
-#include "SkFlattenableBuffers.h"
-#include "SkTDict.h"
-#include "SkThread.h"
-#include <cstring>
-
-SkLanguage SkLanguage::getParent() const {
- SkASSERT(fInfo != NULL);
- const char* tag = fInfo->fTag.c_str();
- SkASSERT(tag != NULL);
-
- // strip off the rightmost "-.*"
- char* parentTagEnd = strrchr(tag, '-');
- if (parentTagEnd == NULL) {
- return SkLanguage("");
- }
- size_t parentTagLen = parentTagEnd - tag;
- char parentTag[parentTagLen + 1];
- strncpy(parentTag, tag, parentTagLen);
- parentTag[parentTagLen] = '\0';
- return SkLanguage(parentTag);
-}
-
-SK_DECLARE_STATIC_MUTEX(gGetInfoMutex);
-const SkLanguageInfo* SkLanguage::getInfo(const char* tag) {
- SkAutoMutexAcquire lock(gGetInfoMutex);
-
- static const size_t kDictSize = 128;
- static SkTDict<SkLanguageInfo*> tagToInfo(kDictSize);
-
- // try a lookup
- SkLanguageInfo* info;
- if (tagToInfo.find(tag, &info)) {
- return info;
- }
-
- // no match - add this language
- info = new SkLanguageInfo(tag);
- tagToInfo.set(tag, info);
- return info;
-}
-
-void SkPaintOptionsAndroid::flatten(SkFlattenableWriteBuffer& buffer) const {
- buffer.writeUInt(fFontVariant);
- buffer.writeString(fLanguage.getTag().c_str());
-}
-
-void SkPaintOptionsAndroid::unflatten(SkFlattenableReadBuffer& buffer) {
- fFontVariant = (FontVariant)buffer.readUInt();
- char* tag = buffer.readString();
- fLanguage = SkLanguage(tag);
- sk_free(tag);
-}
-
-#endif