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

Unified Diff: src/core/SkDevice.cpp

Issue 18024003: ARM Skia NEON patches - 08 - Cleaning / possible fix (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | « no previous file | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index 6290c4eb536de9519bafcaa1a22d2e1eccad7bf4..1de5b4ec49605ce36d9c91220e74b2c1311ae6ae 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -219,32 +219,15 @@ bool SkDevice::readPixels(SkBitmap* bitmap, int x, int y,
return result;
}
-#ifdef SK_CPU_LENDIAN
- #if 24 == SK_A32_SHIFT && 16 == SK_R32_SHIFT && \
- 8 == SK_G32_SHIFT && 0 == SK_B32_SHIFT
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- SkCanvas::kBGRA_Premul_Config8888;
- #elif 24 == SK_A32_SHIFT && 0 == SK_R32_SHIFT && \
- 8 == SK_G32_SHIFT && 16 == SK_B32_SHIFT
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- SkCanvas::kRGBA_Premul_Config8888;
- #else
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- (SkCanvas::Config8888) -1;
- #endif
+#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
+ const SkCanvas::Config8888 SkDevice::kPMColorAlias =
+ SkCanvas::kBGRA_Premul_Config8888;
+#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
+ const SkCanvas::Config8888 SkDevice::kPMColorAlias =
+ SkCanvas::kRGBA_Premul_Config8888;
#else
- #if 0 == SK_A32_SHIFT && 8 == SK_R32_SHIFT && \
- 16 == SK_G32_SHIFT && 24 == SK_B32_SHIFT
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- SkCanvas::kBGRA_Premul_Config8888;
- #elif 0 == SK_A32_SHIFT && 24 == SK_R32_SHIFT && \
- 16 == SK_G32_SHIFT && 8 == SK_B32_SHIFT
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- SkCanvas::kRGBA_Premul_Config8888;
- #else
- const SkCanvas::Config8888 SkDevice::kPMColorAlias =
- (SkCanvas::Config8888) -1;
- #endif
+ const SkCanvas::Config8888 SkDevice::kPMColorAlias =
+ (SkCanvas::Config8888) -1;
#endif
#include <SkConfig8888.h>
« no previous file with comments | « no previous file | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698