remove obsolete SK_BUILD_FOR_BREW conditional
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Jan 2010 22:58:35 +0000 (22:58 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Jan 2010 22:58:35 +0000 (22:58 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@473 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkPreConfig.h
src/animator/SkAnimator.cpp
src/animator/SkAnimatorScript.cpp
src/animator/SkAnimatorScript2.cpp
src/animator/SkMemberInfo.h
src/animator/SkScript.cpp
src/animator/SkScriptTokenizer.cpp
src/core/SkStream.cpp
src/ports/SkOSFile_stdio.cpp

index a3106e5eaf3920e322ae5be9fb8c8772498dad94..0a5170caae1333edfce14b101043805527ae9405 100644 (file)
@@ -77,7 +77,7 @@
 
 //////////////////////////////////////////////////////////////////////
 
-#if (defined(__arm__) && !defined(__thumb__)) || defined(SK_BUILD_FOR_BREW) || defined(SK_BUILD_FOR_WINCE) || (defined(SK_BUILD_FOR_SYMBIAN) && !defined(__MARM_THUMB__))
+#if (defined(__arm__) && !defined(__thumb__)) || defined(SK_BUILD_FOR_WINCE) || (defined(SK_BUILD_FOR_SYMBIAN) && !defined(__MARM_THUMB__))
     /* e.g. the ARM instructions have conditional execution, making tiny branches cheap */
     #define SK_CPU_HAS_CONDITIONAL_INSTR
 #endif
index 242398bba8fed1afd8424d0e8314e30bd4c1bb4f..830f4535f819253f8efc5ae0c1a3ed5f564ba397 100644 (file)
     #define _static static
 #endif
 
-#if !defined SK_BUILD_FOR_BREW || defined SK_DEBUG
-    _static const char gMathPrimerText[] = 
-    "<screenplay>"
-        "<Math id=\"Math\"/>"
-        "<Number id=\"Number\"/>"
-    "</screenplay>";
-#endif
-
-#if defined SK_BUILD_FOR_BREW || defined SK_DEBUG
-    _static const char gMathPrimerBinary[] = 
-    "\x0Ascreenplay\x04Mathbid\x04Math@@";  // !!! now out of date -- does not include Number
-#endif
+_static const char gMathPrimerText[] = 
+"<screenplay>"
+    "<Math id=\"Math\"/>"
+    "<Number id=\"Number\"/>"
+"</screenplay>";
 
-#if defined SK_BUILD_FOR_BREW
-    #define gMathPrimer gMathPrimerBinary
-#else
-    #define gMathPrimer gMathPrimerText
-#endif
+#define gMathPrimer gMathPrimerText
 
 SkAnimator::SkAnimator() : fMaker(NULL) {
     initialize();
index eafe1dbf59bdf2925464a59f16be322cc2b4f501..cc111ca5400e1cae5cb444fa87f5c84b7161d1d1 100644 (file)
@@ -519,8 +519,6 @@ static const char scriptTestSetup[]  =
     "</event>\n"
 "</screenplay>";
 
-#if !defined(SK_BUILD_FOR_BREW)
-
 #define DEFAULT_ANSWER   , 0
 
 static const SkScriptNAnswer scriptTests[]  = {
@@ -559,12 +557,11 @@ static const SkScriptNAnswer scriptTests[]  = {
     {   "0 ? alpha.value.slice(1,2) : 1", SkType_Int, 1 DEFAULT_ANSWER DEFAULT_ANSWER },
     { "idy", SkType_Int, 3 DEFAULT_ANSWER DEFAULT_ANSWER }
 };
-#endif
 
 #define SkScriptNAnswer_testCount   SK_ARRAY_COUNT(scriptTests)
 
 void SkAnimatorScript::UnitTest() {
-#if !defined(SK_BUILD_FOR_BREW) && defined(SK_SUPPORT_UNITTEST)
+#if defined(SK_SUPPORT_UNITTEST)
     SkAnimator animator;
     SkASSERT(animator.decodeMemory(scriptTestSetup, sizeof(scriptTestSetup)-1));
     SkEvent evt;
index 08dbf162c77bc9c70f78557706f31f66f7f5a2c1..3b8ec69a8e62b85f28b08f7dd6a4511b23d69ecb 100644 (file)
@@ -543,7 +543,6 @@ static const char scriptTestSetup[]  =
        "</event>"
 "</screenplay>";
 
-#if !defined(SK_BUILD_FOR_BREW)
 static const SkScriptNAnswer scriptTests[]  = {
        {       "alpha+alpha", SkType_String, 0, 0, "abcabc" },
        {       "0 ? Math.sin(0) : 1", SkType_Int, 1 },
@@ -572,12 +571,11 @@ static const SkScriptNAnswer scriptTests[]  = {
        {       "0 ? alpha.value.slice(1,2) : 1", SkType_Int, 1 },
        { "idy", SkType_Int, 3 }
 };
-#endif
 
 #define SkScriptNAnswer_testCount      SK_ARRAY_COUNT(scriptTests)
 
 void SkAnimatorScript2::UnitTest() {
-#if !defined(SK_BUILD_FOR_BREW) && defined(SK_SUPPORT_UNITTEST)
+#if defined(SK_SUPPORT_UNITTEST)
        SkAnimator animator;
        SkASSERT(animator.decodeMemory(scriptTestSetup, sizeof(scriptTestSetup)-1));
        SkEvent evt;
index e45994e2247aa14ad6d932481b0f12f6d8aaac9a..4f25145a0a0e2e06128c4cd0bce4ad23a741fcc1 100644 (file)
 
 #if defined SK_BUILD_CONDENSED
     #define SK_USE_CONDENSED_INFO 0
-#elif defined  SK_BUILD_FOR_BREW
-    #define SK_USE_CONDENSED_INFO 1 /* required by BREW to handle its lack of writable globals */
-#else
-    #define SK_USE_CONDENSED_INFO 0 /* optional, but usually 1 unless Cary is testing something */
 #endif
 
 #include "SkDisplayType.h"
index 3b67d7b83f921541ef8e0aed498c730653a21189..f81147d4a2559e6a3358117c5bd4b630e02c7aeb 100644 (file)
@@ -1670,7 +1670,6 @@ bool SkScriptEngine::ValueToString(SkScriptValue value, SkString* string) {
 #define testTrue(expression) { #expression, SkType_Int, 1, DEF_SCALAR_ANSWER, DEF_STRING_ANSWER }
 #define testFalse(expression) { #expression, SkType_Int, 0, DEF_SCALAR_ANSWER, DEF_STRING_ANSWER }
 
-#if !defined(SK_BUILD_FOR_BREW)
 static const SkScriptNAnswer scriptTests[]  = {
     testInt(1>1/2),
     testInt((6+7)*8),
@@ -1884,12 +1883,10 @@ static const SkScriptNAnswer scriptTests[]  = {
     , { "123.5", SkType_Float, 0, SkIntToScalar(123) + SK_Scalar1/2, DEF_STRING_ANSWER }
 #endif
 };
-#endif // build for brew
 
 #define SkScriptNAnswer_testCount   SK_ARRAY_COUNT(scriptTests)
 
 void SkScriptEngine::UnitTest() {
-#if !defined(SK_BUILD_FOR_BREW)
     for (unsigned index = 0; index < SkScriptNAnswer_testCount; index++) {
         SkScriptEngine engine(SkScriptEngine::ToOpType(scriptTests[index].fType));
         SkScriptValue value;
@@ -1912,7 +1909,6 @@ void SkScriptEngine::UnitTest() {
                 SkASSERT(0);
         }
     }
-#endif
 }
 #endif
 
index 6be2abd50c66586b37dc784d57b74a692fd89aa3..efd187291c763ebd78ac610cd50890ef5f28b411 100644 (file)
@@ -1274,7 +1274,6 @@ bool SkScriptEngine2::ValueToString(const SkScriptValue2& value, SkString* strin
 #define testTrue(expression) { #expression, SkOperand2::kS32, 1 }
 #define testFalse(expression) { #expression, SkOperand2::kS32, 0 }
 
-#if !defined(SK_BUILD_FOR_BREW)
 static const SkScriptNAnswer2 scriptTests[]  = {
     testInt(1||0&&3),
 #ifdef SK_CAN_USE_FLOAT
@@ -1473,12 +1472,11 @@ static const SkScriptNAnswer2 scriptTests[]  = {
     , {    "123.5", SkOperand2::kScalar, 0, SkIntToScalar(123) + SK_Scalar1/2 }
 #endif
 };
-#endif // build for brew
 
 #define SkScriptNAnswer_testCount    SK_ARRAY_COUNT(scriptTests)
 
 void SkScriptEngine2::UnitTest() {
-#if !defined(SK_BUILD_FOR_BREW) && defined(SK_SUPPORT_UNITTEST)
+#if defined(SK_SUPPORT_UNITTEST)
     ValidateDecompileTable();
     for (int index = 0; index < SkScriptNAnswer_testCount; index++) {
         SkScriptEngine2 engine(scriptTests[index].fType);
index 4def1469d2de93c66ca3cda8750090be6054c078..6187f817d1bbeceb6161431cec89dfe506bcf3e0 100644 (file)
@@ -187,11 +187,6 @@ bool SkWStream::writeStream(SkStream* stream, size_t length) {
 
 SkFILEStream::SkFILEStream(const char file[]) : fName(file)
 {
-#ifdef SK_BUILD_FOR_BREW
-    if (SkStrEndsWith(fName.c_str(), ".xml"))
-        fName.writable_str()[fName.size()-3] = 'b';
-#endif
-
     fFILE = file ? sk_fopen(fName.c_str(), kRead_SkFILE_Flag) : NULL;
 }
 
@@ -204,11 +199,6 @@ SkFILEStream::~SkFILEStream()
 void SkFILEStream::setPath(const char path[])
 {
     fName.set(path);
-#ifdef SK_BUILD_FOR_BREW
-    if (SkStrEndsWith(fName.c_str(), ".xml"))
-        fName.writable_str()[fName.size()-3] = 'b';
-#endif
-
     if (fFILE)
     {
         sk_fclose(fFILE);
index 7438f7b76d1722e684b2df0c61e2781863592f4e..f6fa818fa8efadbd097a3faf32827b5c935cd2ac 100644 (file)
@@ -17,8 +17,6 @@
 
 #include "SkOSFile.h"
 
-#ifndef SK_BUILD_FOR_BREW
-
 #include <stdio.h>
 #include <errno.h>
 
@@ -102,5 +100,3 @@ void sk_fclose(SkFILE* f)
     ::fclose((FILE*)f);
 }
 
-#endif
-