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

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

Issue 1187173005: Plumb through out_row byte length so we can assert we stay underneath it. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 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 | « src/opts/SkBitmapFilter_opts_SSE2.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkBitmapProcState.h" 8 #include "SkBitmapProcState.h"
9 #include "SkBitmapProcState_filter.h" 9 #include "SkBitmapProcState_filter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 outRow); 382 outRow);
383 } 383 }
384 } 384 }
385 385
386 // Convolves horizontally along four rows. The row data is given in 386 // Convolves horizontally along four rows. The row data is given in
387 // |src_data| and continues for the num_values() of the filter. 387 // |src_data| and continues for the num_values() of the filter.
388 // The algorithm is almost same as |ConvolveHorizontally_SSE2|. Please 388 // The algorithm is almost same as |ConvolveHorizontally_SSE2|. Please
389 // refer to that function for detailed comments. 389 // refer to that function for detailed comments.
390 void convolve4RowsHorizontally_neon(const unsigned char* srcData[4], 390 void convolve4RowsHorizontally_neon(const unsigned char* srcData[4],
391 const SkConvolutionFilter1D& filter, 391 const SkConvolutionFilter1D& filter,
392 unsigned char* outRow[4]) { 392 unsigned char* outRow[4],
393 size_t outRowBytes) {
393 394
394 uint8x8_t coeff_mask0 = vcreate_u8(0x0100010001000100); 395 uint8x8_t coeff_mask0 = vcreate_u8(0x0100010001000100);
395 uint8x8_t coeff_mask1 = vcreate_u8(0x0302030203020302); 396 uint8x8_t coeff_mask1 = vcreate_u8(0x0302030203020302);
396 uint8x8_t coeff_mask2 = vcreate_u8(0x0504050405040504); 397 uint8x8_t coeff_mask2 = vcreate_u8(0x0504050405040504);
397 uint8x8_t coeff_mask3 = vcreate_u8(0x0706070607060706); 398 uint8x8_t coeff_mask3 = vcreate_u8(0x0706070607060706);
398 int num_values = filter.numValues(); 399 int num_values = filter.numValues();
399 400
400 int filterOffset, filterLength; 401 int filterOffset, filterLength;
401 // |mask| will be used to decimate all extra filter coefficients that are 402 // |mask| will be used to decimate all extra filter coefficients that are
402 // loaded by SIMD when |filter_length| is not divisible by 4. 403 // loaded by SIMD when |filter_length| is not divisible by 4.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 515 }
515 } 516 }
516 517
517 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) { 518 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) {
518 procs->fExtraHorizontalReads = 3; 519 procs->fExtraHorizontalReads = 3;
519 procs->fConvolveVertically = &convolveVertically_neon; 520 procs->fConvolveVertically = &convolveVertically_neon;
520 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon; 521 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon;
521 procs->fConvolveHorizontally = &convolveHorizontally_neon; 522 procs->fConvolveHorizontally = &convolveHorizontally_neon;
522 procs->fApplySIMDPadding = &applySIMDPadding_neon; 523 procs->fApplySIMDPadding = &applySIMDPadding_neon;
523 } 524 }
OLDNEW
« no previous file with comments | « src/opts/SkBitmapFilter_opts_SSE2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698