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

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

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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
« no previous file with comments | « src/opts/SkBitmapProcState_opts_SSE2.cpp ('k') | src/opts/SkBitmapProcState_opts_mips_dsp.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 2012 The Android Open Source Project 2 * Copyright 2012 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_SSSE3.h" 8 #include "SkBitmapProcState_opts_SSSE3.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // as one can see in the SSE2 implementation, all inputs have to be used as 386 // as one can see in the SSE2 implementation, all inputs have to be used as
387 // 16 bits because the results are 16 bits. This basically allows us to process 387 // 16 bits because the results are 16 bits. This basically allows us to process
388 // twice as many pixel components per iteration. 388 // twice as many pixel components per iteration.
389 // 389 //
390 // As a result, this method behaves faster than the traditional SSE2. The actual 390 // As a result, this method behaves faster than the traditional SSE2. The actual
391 // boost varies greatly on the underlying architecture. 391 // boost varies greatly on the underlying architecture.
392 template<bool has_alpha> 392 template<bool has_alpha>
393 void S32_generic_D32_filter_DX_SSSE3(const SkBitmapProcState& s, 393 void S32_generic_D32_filter_DX_SSSE3(const SkBitmapProcState& s,
394 const uint32_t* xy, 394 const uint32_t* xy,
395 int count, uint32_t* colors) { 395 int count, uint32_t* colors) {
396 SkASSERT(count > 0 && colors != NULL); 396 SkASSERT(count > 0 && colors != nullptr);
397 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); 397 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality);
398 SkASSERT(kN32_SkColorType == s.fPixmap.colorType()); 398 SkASSERT(kN32_SkColorType == s.fPixmap.colorType());
399 if (has_alpha) { 399 if (has_alpha) {
400 SkASSERT(s.fAlphaScale < 256); 400 SkASSERT(s.fAlphaScale < 256);
401 } else { 401 } else {
402 SkASSERT(s.fAlphaScale == 256); 402 SkASSERT(s.fAlphaScale == 256);
403 } 403 }
404 404
405 const uint8_t* src_addr = 405 const uint8_t* src_addr =
406 static_cast<const uint8_t*>(s.fPixmap.addr()); 406 static_cast<const uint8_t*>(s.fPixmap.addr());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 } 578 }
579 579
580 /* 580 /*
581 * Similar to S32_generic_D32_filter_DX_SSSE3, we do not need to handle the 581 * Similar to S32_generic_D32_filter_DX_SSSE3, we do not need to handle the
582 * special case suby == 0 as suby is changing in every loop. 582 * special case suby == 0 as suby is changing in every loop.
583 */ 583 */
584 template<bool has_alpha> 584 template<bool has_alpha>
585 void S32_generic_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, 585 void S32_generic_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s,
586 const uint32_t* xy, 586 const uint32_t* xy,
587 int count, uint32_t* colors) { 587 int count, uint32_t* colors) {
588 SkASSERT(count > 0 && colors != NULL); 588 SkASSERT(count > 0 && colors != nullptr);
589 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality); 589 SkASSERT(s.fFilterLevel != kNone_SkFilterQuality);
590 SkASSERT(kN32_SkColorType == s.fPixmap.colorType()); 590 SkASSERT(kN32_SkColorType == s.fPixmap.colorType());
591 if (has_alpha) { 591 if (has_alpha) {
592 SkASSERT(s.fAlphaScale < 256); 592 SkASSERT(s.fAlphaScale < 256);
593 } else { 593 } else {
594 SkASSERT(s.fAlphaScale == 256); 594 SkASSERT(s.fAlphaScale == 256);
595 } 595 }
596 596
597 const uint8_t* src_addr = 597 const uint8_t* src_addr =
598 static_cast<const uint8_t*>(s.fPixmap.addr()); 598 static_cast<const uint8_t*>(s.fPixmap.addr());
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 sk_throw(); 786 sk_throw();
787 } 787 }
788 788
789 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s, 789 void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s,
790 const uint32_t* xy, 790 const uint32_t* xy,
791 int count, uint16_t* colors) { 791 int count, uint16_t* colors) {
792 sk_throw(); 792 sk_throw();
793 } 793 }
794 794
795 #endif 795 #endif
OLDNEW
« no previous file with comments | « src/opts/SkBitmapProcState_opts_SSE2.cpp ('k') | src/opts/SkBitmapProcState_opts_mips_dsp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698