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

Side by Side Diff: src/opts/SkBitmapProcState_opts_arm.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/core/SkConvolver.cpp ('k') | src/opts/opts_check_SSE2.cpp » ('j') | 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 8
9 #include "SkBitmapProcState.h" 9 #include "SkBitmapProcState.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // Padding |paddingCount| of more dummy coefficients after the coefficients 394 // Padding |paddingCount| of more dummy coefficients after the coefficients
395 // of last filter to prevent SIMD instructions which load 8 or 16 bytes 395 // of last filter to prevent SIMD instructions which load 8 or 16 bytes
396 // together to access invalid memory areas. We are not trying to align the 396 // together to access invalid memory areas. We are not trying to align the
397 // coefficients right now due to the opaqueness of <vector> implementation. 397 // coefficients right now due to the opaqueness of <vector> implementation.
398 // This has to be done after all |AddFilter| calls. 398 // This has to be done after all |AddFilter| calls.
399 for (int i = 0; i < 8; ++i) { 399 for (int i = 0; i < 8; ++i) {
400 filter->addFilterValue(static_cast<SkConvolutionFilter1D::ConvolutionFix ed>(0)); 400 filter->addFilterValue(static_cast<SkConvolutionFilter1D::ConvolutionFix ed>(0));
401 } 401 }
402 } 402 }
403 403
404 void SkBitmapProcState::platformConvolutionProcs() { 404 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) {
405 if (sk_cpu_arm_has_neon()) { 405 if (sk_cpu_arm_has_neon()) {
406 fConvolutionProcs->fExtraHorizontalReads = 3; 406 procs->fExtraHorizontalReads = 3;
407 fConvolutionProcs->fConvolveVertically = &convolveVertically_arm; 407 procs->fConvolveVertically = &convolveVertically_arm;
408 408
409 // next line is commented out because the four-row convolution function above is 409 // next line is commented out because the four-row convolution function above is
410 // just a no-op. Please see the comment above its definition, and the S SE implementation 410 // just a no-op. Please see the comment above its definition, and the S SE implementation
411 // in SkBitmapProcState_opts_SSE2.cpp for guidance on its semantics. 411 // in SkBitmapProcState_opts_SSE2.cpp for guidance on its semantics.
412 // leaving it as NULL will just cause the convolution system to not atte mpt 412 // leaving it as NULL will just cause the convolution system to not atte mpt
413 // to operate on four rows at once, which is correct but not performance -optimal. 413 // to operate on four rows at once, which is correct but not performance -optimal.
414 414
415 // fConvolutionProcs->fConvolve4RowsHorizontally = &convolve4RowsHorizon tally_arm; 415 // procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_arm;
416 416
417 fConvolutionProcs->fConvolve4RowsHorizontally = NULL; 417 procs->fConvolve4RowsHorizontally = NULL;
418 418
419 fConvolutionProcs->fConvolveHorizontally = &convolveHorizontally_arm; 419 procs->fConvolveHorizontally = &convolveHorizontally_arm;
420 fConvolutionProcs->fApplySIMDPadding = &applySIMDPadding_arm; 420 procs->fApplySIMDPadding = &applySIMDPadding_arm;
421 } 421 }
422 } 422 }
OLDNEW
« no previous file with comments | « src/core/SkConvolver.cpp ('k') | src/opts/opts_check_SSE2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698