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

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

Issue 23796005: remove fConvolutionProcs from State, and just use it locally (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « src/opts/SkBitmapProcState_opts_arm.cpp ('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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return gHasSSE2; 100 return gHasSSE2;
101 } 101 }
102 102
103 static bool cachedHasSSSE3() { 103 static bool cachedHasSSSE3() {
104 static bool gHasSSSE3 = hasSSSE3(); 104 static bool gHasSSSE3 = hasSSSE3();
105 return gHasSSSE3; 105 return gHasSSSE3;
106 } 106 }
107 107
108 SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "U se SSE optimized version of high quality image filters"); 108 SK_CONF_DECLARE( bool, c_hqfilter_sse, "bitmap.filter.highQualitySSE", false, "U se SSE optimized version of high quality image filters");
109 109
110 void SkBitmapProcState::platformConvolutionProcs() { 110 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) {
111 if (cachedHasSSE2()) { 111 if (cachedHasSSE2()) {
112 fConvolutionProcs->fExtraHorizontalReads = 3; 112 procs->fExtraHorizontalReads = 3;
113 fConvolutionProcs->fConvolveVertically = &convolveVertically_SSE2; 113 procs->fConvolveVertically = &convolveVertically_SSE2;
114 fConvolutionProcs->fConvolve4RowsHorizontally = &convolve4RowsHorizontal ly_SSE2; 114 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_SSE2;
115 fConvolutionProcs->fConvolveHorizontally = &convolveHorizontally_SSE2; 115 procs->fConvolveHorizontally = &convolveHorizontally_SSE2;
116 fConvolutionProcs->fApplySIMDPadding = &applySIMDPadding_SSE2; 116 procs->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 (fSampleProc32 == S32_opaque_D32_filter_DX) { 122 if (fSampleProc32 == S32_opaque_D32_filter_DX) {
123 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3; 123 fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
124 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) { 124 } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
125 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3; 125 fSampleProc32 = S32_alpha_D32_filter_DX_SSSE3;
126 } 126 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning 251 SkBlitRow::ColorRectProc PlatformColorRectProcFactory(); // suppress warning
252 252
253 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { 253 SkBlitRow::ColorRectProc PlatformColorRectProcFactory() {
254 if (cachedHasSSE2()) { 254 if (cachedHasSSE2()) {
255 return ColorRect32_SSE2; 255 return ColorRect32_SSE2;
256 } else { 256 } else {
257 return NULL; 257 return NULL;
258 } 258 }
259 } 259 }
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_opts_arm.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698