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

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

Issue 21203005: Enable runtime checks for SSSE3 on x86 on Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « gyp/opts.gyp ('k') | 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 fConvolutionProcs->fExtraHorizontalReads = 3; 112 fConvolutionProcs->fExtraHorizontalReads = 3;
113 fConvolutionProcs->fConvolveVertically = &convolveVertically_SSE2; 113 fConvolutionProcs->fConvolveVertically = &convolveVertically_SSE2;
114 fConvolutionProcs->fConvolve4RowsHorizontally = &convolve4RowsHorizontal ly_SSE2; 114 fConvolutionProcs->fConvolve4RowsHorizontally = &convolve4RowsHorizontal ly_SSE2;
115 fConvolutionProcs->fConvolveHorizontally = &convolveHorizontally_SSE2; 115 fConvolutionProcs->fConvolveHorizontally = &convolveHorizontally_SSE2;
116 fConvolutionProcs->fApplySIMDPadding = &applySIMDPadding_SSE2; 116 fConvolutionProcs->fApplySIMDPadding = &applySIMDPadding_SSE2;
117 } 117 }
118 } 118 }
119 119
120 void SkBitmapProcState::platformProcs() { 120 void SkBitmapProcState::platformProcs() {
121 if (cachedHasSSSE3()) { 121 if (cachedHasSSSE3()) {
122 #if !defined(SK_BUILD_FOR_ANDROID)
123 // Disable SSSE3 optimization for Android x86
124 if (fSampleProc32 == S32_opaque_D32_filter_DX) { 122 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
125 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3; 123 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
126 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) { 124 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
127 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3; 125 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
128 } 126 }
129 127
130 if (fSampleProc32 == S32_opaque_D32_filter_DXDY) { 128 if (fSampleProc32 == S32_opaque_D32_filter_DXDY) {
131 fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3; 129 fSampleProc32 = S32_opaque_D32_filter_DXDY_SSSE3;
132 } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) { 130 } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
133 fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3; 131 fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
134 } 132 }
135 #endif
136 } else if (cachedHasSSE2()) { 133 } else if (cachedHasSSE2()) {
137 if (fSampleProc32 == S32_opaque_D32_filter_DX) { 134 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
138 fSampleProc32 = S32_opaque_D32_filter_DX_SSE2; 135 fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;
139 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) { 136 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
140 fSampleProc32 = S32_alpha_D32_filter_DX_SSE2; 137 fSampleProc32 = S32_alpha_D32_filter_DX_SSE2;
141 } 138 }
142 139
143 if (fSampleProc16 == S32_D16_filter_DX) { 140 if (fSampleProc16 == S32_D16_filter_DX) {
144 fSampleProc16 = S32_D16_filter_DX_SSE2; 141 fSampleProc16 = S32_D16_filter_DX_SSE2;
145 } 142 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 250
254 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning 251 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
255 252
256 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { 253 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
257 if (cachedHasSSE2()) { 254 if (cachedHasSSE2()) {
258 return ColorRect32_SSE2; 255 return ColorRect32_SSE2;
259 } else { 256 } else {
260 return NULL; 257 return NULL;
261 } 258 }
262 } 259 }
OLDNEW
« no previous file with comments | « gyp/opts.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698