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

Side by Side Diff: skia/ext/convolver.h

Issue 13293004: enable SSE2 in skia/convolver for linux32 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: less whitespace Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | skia/ext/convolver.cc » ('j') | skia/ext/convolver.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_CONVOLVER_H_ 5 #ifndef SKIA_EXT_CONVOLVER_H_
6 #define SKIA_EXT_CONVOLVER_H_ 6 #define SKIA_EXT_CONVOLVER_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/cpu.h" 12 #include "base/cpu.h"
13 #include "third_party/skia/include/core/SkTypes.h" 13 #include "third_party/skia/include/core/SkTypes.h"
14 14
15 #if defined(ARCH_CPU_X86_FAMILY) 15 #if defined(ARCH_CPU_X86_FAMILY)
16 // TODO(hclam): SSE2 is disabled on Linux 32-bits because GCC requires -msse2.
17 // We should refactor the code in .cc and enable this.
18 #if defined(ARCH_CPU_X86_64) || defined(OS_MACOSX) || defined(COMPILER_MSVC)
19 #define SIMD_SSE2 1 16 #define SIMD_SSE2 1
20 #endif 17 #endif
21 #endif
22 18
23 // avoid confusion with Mac OS X's math library (Carbon) 19 // avoid confusion with Mac OS X's math library (Carbon)
24 #if defined(__APPLE__) 20 #if defined(__APPLE__)
25 #undef FloatToFixed 21 #undef FloatToFixed
26 #undef FixedToFloat 22 #undef FixedToFloat
27 #endif 23 #endif
28 24
29 namespace skia { 25 namespace skia {
30 26
31 // Represents a filter in one dimension. Each output pixel has one entry in this 27 // Represents a filter in one dimension. Each output pixel has one entry in this
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 int source_byte_row_stride, 160 int source_byte_row_stride,
165 bool source_has_alpha, 161 bool source_has_alpha,
166 const ConvolutionFilter1D& xfilter, 162 const ConvolutionFilter1D& xfilter,
167 const ConvolutionFilter1D& yfilter, 163 const ConvolutionFilter1D& yfilter,
168 int output_byte_row_stride, 164 int output_byte_row_stride,
169 unsigned char* output, 165 unsigned char* output,
170 bool use_sse2); 166 bool use_sse2);
171 } // namespace skia 167 } // namespace skia
172 168
173 #endif // SKIA_EXT_CONVOLVER_H_ 169 #endif // SKIA_EXT_CONVOLVER_H_
OLDNEW
« no previous file with comments | « no previous file | skia/ext/convolver.cc » ('j') | skia/ext/convolver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698