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

Side by Side Diff: src/core/SkBlitter_RGB16.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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/core/SkBlitter.cpp ('k') | src/core/SkCanvas.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 8
9 9
10 #include "SkBlitRow.h" 10 #include "SkBlitRow.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint, 1030 SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint,
1031 SkShader::Context* shaderContext, 1031 SkShader::Context* shaderContext,
1032 SkTBlitterAllocator* allocator) { 1032 SkTBlitterAllocator* allocator) {
1033 SkASSERT(allocator != NULL); 1033 SkASSERT(allocator != NULL);
1034 1034
1035 SkBlitter* blitter; 1035 SkBlitter* blitter;
1036 SkShader* shader = paint.getShader(); 1036 SkShader* shader = paint.getShader();
1037 SkXfermode* mode = paint.getXfermode(); 1037 SkXfermode* mode = paint.getXfermode();
1038 1038
1039 // we require a shader if there is an xfermode, handled by our caller 1039 // we require a shader if there is an xfermode, handled by our caller
1040 SkASSERT(NULL == mode || NULL != shader); 1040 SkASSERT(NULL == mode || shader);
1041 1041
1042 if (shader) { 1042 if (shader) {
1043 SkASSERT(shaderContext != NULL); 1043 SkASSERT(shaderContext != NULL);
1044 if (mode) { 1044 if (mode) {
1045 blitter = allocator->createT<SkRGB16_Shader_Xfermode_Blitter>(device , paint, 1045 blitter = allocator->createT<SkRGB16_Shader_Xfermode_Blitter>(device , paint,
1046 shader Context); 1046 shader Context);
1047 } else if (shaderContext->canCallShadeSpan16()) { 1047 } else if (shaderContext->canCallShadeSpan16()) {
1048 blitter = allocator->createT<SkRGB16_Shader16_Blitter>(device, paint , shaderContext); 1048 blitter = allocator->createT<SkRGB16_Shader16_Blitter>(device, paint , shaderContext);
1049 } else { 1049 } else {
1050 blitter = allocator->createT<SkRGB16_Shader_Blitter>(device, paint, shaderContext); 1050 blitter = allocator->createT<SkRGB16_Shader_Blitter>(device, paint, shaderContext);
1051 } 1051 }
1052 } else { 1052 } else {
1053 // no shader, no xfermode, (and we always ignore colorfilter) 1053 // no shader, no xfermode, (and we always ignore colorfilter)
1054 SkColor color = paint.getColor(); 1054 SkColor color = paint.getColor();
1055 if (0 == SkColorGetA(color)) { 1055 if (0 == SkColorGetA(color)) {
1056 blitter = allocator->createT<SkNullBlitter>(); 1056 blitter = allocator->createT<SkNullBlitter>();
1057 #ifdef USE_BLACK_BLITTER 1057 #ifdef USE_BLACK_BLITTER
1058 } else if (SK_ColorBLACK == color) { 1058 } else if (SK_ColorBLACK == color) {
1059 blitter = allocator->createT<SkRGB16_Black_Blitter>(device, paint); 1059 blitter = allocator->createT<SkRGB16_Black_Blitter>(device, paint);
1060 #endif 1060 #endif
1061 } else if (0xFF == SkColorGetA(color)) { 1061 } else if (0xFF == SkColorGetA(color)) {
1062 blitter = allocator->createT<SkRGB16_Opaque_Blitter>(device, paint); 1062 blitter = allocator->createT<SkRGB16_Opaque_Blitter>(device, paint);
1063 } else { 1063 } else {
1064 blitter = allocator->createT<SkRGB16_Blitter>(device, paint); 1064 blitter = allocator->createT<SkRGB16_Blitter>(device, paint);
1065 } 1065 }
1066 } 1066 }
1067 1067
1068 return blitter; 1068 return blitter;
1069 } 1069 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698