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

Side by Side Diff: src/opts/opts_check_SSE2.cpp

Issue 249883004: fix x86 emulator for Android framework. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmapProcState_opts_SSE2.h" 8 #include "SkBitmapProcState_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSSE3.h" 9 #include "SkBitmapProcState_opts_SSSE3.h"
10 #include "SkBitmapFilter_opts_SSE2.h" 10 #include "SkBitmapFilter_opts_SSE2.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 getcpuid(1, cpu_info); 84 getcpuid(1, cpu_info);
85 return (cpu_info[3] & (1<<26)) != 0; 85 return (cpu_info[3] & (1<<26)) != 0;
86 } 86 }
87 #endif 87 #endif
88 88
89 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 89 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3
90 /* If we know SSSE3 is supported at compile time, don't even bother checking. */ 90 /* If we know SSSE3 is supported at compile time, don't even bother checking. */
91 static inline bool hasSSSE3() { 91 static inline bool hasSSSE3() {
92 return true; 92 return true;
93 } 93 }
94 #elif defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
95 /* For the Android framework we should always know at compile time if the device
96 * we are building for supports SSSE3. The one exception to this rule is on the
97 * emulator where we are compiled without the -msse3 option (so we have no SSSE3
98 * procs) but can be run on a host machine that supports SSSE3 instructions. So
99 * for that particular case we disable our SSSE3 options.
100 */
101 static inline bool hasSSSE3() {
102 return false;
103 }
94 #else 104 #else
95 105
96 static inline bool hasSSSE3() { 106 static inline bool hasSSSE3() {
97 int cpu_info[4] = { 0 }; 107 int cpu_info[4] = { 0 };
98 getcpuid(1, cpu_info); 108 getcpuid(1, cpu_info);
99 return (cpu_info[2] & 0x200) != 0; 109 return (cpu_info[2] & 0x200) != 0;
100 } 110 }
101 #endif 111 #endif
102 112
103 static bool cachedHasSSE2() { 113 static bool cachedHasSSE2() {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } else { 341 } else {
332 return SkPlatformXfermodeFactory_impl(rec, mode); 342 return SkPlatformXfermodeFactory_impl(rec, mode);
333 } 343 }
334 } 344 }
335 345
336 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode); 346 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode);
337 347
338 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) { 348 SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode) {
339 return NULL; 349 return NULL;
340 } 350 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698