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

Side by Side Diff: tests/ImageFilterTest.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 | « tests/ImageDecodingTest.cpp ('k') | tests/KtxTest.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Check that two non-clipping color matrices concatenate into a single filter. 145 // Check that two non-clipping color matrices concatenate into a single filter.
146 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f)); 146 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f));
147 SkAutoTUnref<SkImageFilter> quarterBrightness(make_scale(0.5f, halfBrigh tness)); 147 SkAutoTUnref<SkImageFilter> quarterBrightness(make_scale(0.5f, halfBrigh tness));
148 REPORTER_ASSERT(reporter, NULL == quarterBrightness->getInput(0)); 148 REPORTER_ASSERT(reporter, NULL == quarterBrightness->getInput(0));
149 } 149 }
150 150
151 { 151 {
152 // Check that a clipping color matrix followed by a grayscale does not c oncatenate into a single filter. 152 // Check that a clipping color matrix followed by a grayscale does not c oncatenate into a single filter.
153 SkAutoTUnref<SkImageFilter> doubleBrightness(make_scale(2.0f)); 153 SkAutoTUnref<SkImageFilter> doubleBrightness(make_scale(2.0f));
154 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f, doubleBright ness)); 154 SkAutoTUnref<SkImageFilter> halfBrightness(make_scale(0.5f, doubleBright ness));
155 REPORTER_ASSERT(reporter, NULL != halfBrightness->getInput(0)); 155 REPORTER_ASSERT(reporter, halfBrightness->getInput(0));
156 } 156 }
157 157
158 { 158 {
159 // Check that a color filter image filter without a crop rect can be 159 // Check that a color filter image filter without a crop rect can be
160 // expressed as a color filter. 160 // expressed as a color filter.
161 SkAutoTUnref<SkImageFilter> gray(make_grayscale()); 161 SkAutoTUnref<SkImageFilter> gray(make_grayscale());
162 REPORTER_ASSERT(reporter, true == gray->asColorFilter(NULL)); 162 REPORTER_ASSERT(reporter, true == gray->asColorFilter(NULL));
163 } 163 }
164 164
165 { 165 {
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 960 }
961 961
962 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { 962 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) {
963 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0)); 963 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0));
964 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, 964 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
965 SkImageInfo::MakeN32Pre mul(1, 1), 965 SkImageInfo::MakeN32Pre mul(1, 1),
966 0)); 966 0));
967 test_xfermode_cropped_input(device, reporter); 967 test_xfermode_cropped_input(device, reporter);
968 } 968 }
969 #endif 969 #endif
OLDNEW
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tests/KtxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698