aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-07-29 12:34:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-29 12:34:25 -0700
commit028205bedb7df56b0995ebb44238a69ff1681d0b (patch)
tree21720d020783b263dba981b0e92296a32d52380d
parent5f865b9cf11ac16e41f10d78276d6b8cf68762de (diff)
Remove SK_BUILD_FOR_WINCE.
This hasn't been tested for years, and no one currently knows when it last worked (if ever). It is doubtful that any of the remaining logic would even make sense with a modern version of Embedded Compact 2013. Review URL: https://codereview.chromium.org/1260453008
-rw-r--r--include/core/SkFloatingPoint.h46
-rw-r--r--include/core/SkPreConfig.h4
-rw-r--r--include/views/SkWindow.h5
-rw-r--r--src/views/SkWindow.cpp29
4 files changed, 16 insertions, 68 deletions
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index 13e8963c14..73eb26c0db 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -56,40 +56,24 @@ static inline float sk_float_copysign(float x, float y) {
#endif
}
-#ifdef SK_BUILD_FOR_WINCE
- #define sk_float_sqrt(x) (float)::sqrt(x)
- #define sk_float_sin(x) (float)::sin(x)
- #define sk_float_cos(x) (float)::cos(x)
- #define sk_float_tan(x) (float)::tan(x)
- #define sk_float_acos(x) (float)::acos(x)
- #define sk_float_asin(x) (float)::asin(x)
- #define sk_float_atan2(y,x) (float)::atan2(y,x)
- #define sk_float_abs(x) (float)::fabs(x)
- #define sk_float_mod(x,y) (float)::fmod(x,y)
- #define sk_float_exp(x) (float)::exp(x)
- #define sk_float_log(x) (float)::log(x)
- #define sk_float_floor(x) (float)::floor(x)
- #define sk_float_ceil(x) (float)::ceil(x)
-#else
- #define sk_float_sqrt(x) sqrtf(x)
- #define sk_float_sin(x) sinf(x)
- #define sk_float_cos(x) cosf(x)
- #define sk_float_tan(x) tanf(x)
- #define sk_float_floor(x) floorf(x)
- #define sk_float_ceil(x) ceilf(x)
+#define sk_float_sqrt(x) sqrtf(x)
+#define sk_float_sin(x) sinf(x)
+#define sk_float_cos(x) cosf(x)
+#define sk_float_tan(x) tanf(x)
+#define sk_float_floor(x) floorf(x)
+#define sk_float_ceil(x) ceilf(x)
#ifdef SK_BUILD_FOR_MAC
- #define sk_float_acos(x) static_cast<float>(acos(x))
- #define sk_float_asin(x) static_cast<float>(asin(x))
+# define sk_float_acos(x) static_cast<float>(acos(x))
+# define sk_float_asin(x) static_cast<float>(asin(x))
#else
- #define sk_float_acos(x) acosf(x)
- #define sk_float_asin(x) asinf(x)
-#endif
- #define sk_float_atan2(y,x) atan2f(y,x)
- #define sk_float_abs(x) fabsf(x)
- #define sk_float_mod(x,y) fmodf(x,y)
- #define sk_float_exp(x) expf(x)
- #define sk_float_log(x) logf(x)
+# define sk_float_acos(x) acosf(x)
+# define sk_float_asin(x) asinf(x)
#endif
+#define sk_float_atan2(y,x) atan2f(y,x)
+#define sk_float_abs(x) fabsf(x)
+#define sk_float_mod(x,y) fmodf(x,y)
+#define sk_float_exp(x) expf(x)
+#define sk_float_log(x) logf(x)
#define sk_float_round(x) sk_float_floor((x) + 0.5f)
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index 745ba90f37..2c1589c173 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -23,7 +23,7 @@
//////////////////////////////////////////////////////////////////////
-#if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WINCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW)
+#if !defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) && !defined(SK_BUILD_FOR_BREW)
#ifdef __APPLE__
#include "TargetConditionals.h"
@@ -31,8 +31,6 @@
#if defined(PALMOS_SDK_VERSION)
#define SK_BUILD_FOR_PALM
- #elif defined(UNDER_CE)
- #define SK_BUILD_FOR_WINCE
#elif defined(WIN32)
#define SK_BUILD_FOR_WIN32
#elif defined(__SYMBIAN32__)
diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h
index 602c1c2076..5fa3afcd11 100644
--- a/include/views/SkWindow.h
+++ b/include/views/SkWindow.h
@@ -17,11 +17,6 @@
#include "SkSurfaceProps.h"
#include "SkTDArray.h"
-#ifdef SK_BUILD_FOR_WINCEx
- #define SHOW_FPS
-#endif
-//#define USE_GX_SCREEN
-
class SkSurface;
class SkOSMenu;
diff --git a/src/views/SkWindow.cpp b/src/views/SkWindow.cpp
index 7ab729e1d2..9eef0230eb 100644
--- a/src/views/SkWindow.cpp
+++ b/src/views/SkWindow.cpp
@@ -20,13 +20,7 @@ SkWindow::SkWindow()
{
fClicks.reset();
fWaitingOnInval = false;
-
-#ifdef SK_BUILD_FOR_WINCE
- fColorType = kRGB_565_SkColorType;
-#else
fColorType = kN32_SkColorType;
-#endif
-
fMatrix.reset();
}
@@ -105,31 +99,12 @@ void SkWindow::forceInvalAll() {
SkScalarCeilToInt(this->height()));
}
-#if defined(SK_BUILD_FOR_WINCE) && defined(USE_GX_SCREEN)
- #include <windows.h>
- #include <gx.h>
- extern GXDisplayProperties gDisplayProps;
-#endif
-
#ifdef SK_SIMULATE_FAILED_MALLOC
extern bool gEnableControlledThrow;
#endif
bool SkWindow::update(SkIRect* updateArea) {
if (!fDirtyRgn.isEmpty()) {
-#if defined(SK_BUILD_FOR_WINCE) && defined(USE_GX_SCREEN)
- SkBitmap bm = this->getBitmap();
-
- char* buffer = (char*)GXBeginDraw();
- SkASSERT(buffer);
-
- RECT rect;
- GetWindowRect((HWND)((SkOSWindow*)this)->getHWND(), &rect);
- buffer += rect.top * gDisplayProps.cbyPitch + rect.left * gDisplayProps.cbxPitch;
-
- bm.setPixels(buffer);
-#endif
-
SkAutoTUnref<SkSurface> surface(this->createSurface());
SkCanvas* canvas = surface->getCanvas();
@@ -161,10 +136,6 @@ bool SkWindow::update(SkIRect* updateArea) {
gEnableControlledThrow = false;
#endif
-#if defined(SK_BUILD_FOR_WINCE) && defined(USE_GX_SCREEN)
- GXEndDraw();
-#endif
-
return true;
}
return false;