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

Side by Side Diff: tests/GLProgramsTest.cpp

Issue 115633002: Add AlphaThreshold filter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix tests build Created 6 years, 11 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/effects/SkAlphaThresholdFilter.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 2011 Google Inc. 3 * Copyright 2011 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 8
9 // This is a GPU-backend specific test. It relies on static intializers to work 9 // This is a GPU-backend specific test. It relies on static intializers to work
10 10
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 #include "TestClassDef.h" 246 #include "TestClassDef.h"
247 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest) 247 DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest)
248 248
249 // This is evil evil evil. The linker may throw away whole translation units as dead code if it 249 // This is evil evil evil. The linker may throw away whole translation units as dead code if it
250 // thinks none of the functions are called. It will do this even if there are st atic initializers 250 // thinks none of the functions are called. It will do this even if there are st atic initializers
251 // in the unit that could pass pointers to functions from the unit out to other translation units! 251 // in the unit that could pass pointers to functions from the unit out to other translation units!
252 // We force some of the effects that would otherwise be discarded to link here. 252 // We force some of the effects that would otherwise be discarded to link here.
253 253
254 #include "SkAlphaThresholdFilter.h"
254 #include "SkLightingImageFilter.h" 255 #include "SkLightingImageFilter.h"
255 #include "SkMagnifierImageFilter.h" 256 #include "SkMagnifierImageFilter.h"
256 #include "SkColorMatrixFilter.h" 257 #include "SkColorMatrixFilter.h"
257 258
258 void forceLinking(); 259 void forceLinking();
259 260
260 void forceLinking() { 261 void forceLinking() {
261 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); 262 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0);
263 SkAlphaThresholdFilter::Create(SkRegion(), .5, .5);
262 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar 1); 264 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar 1);
263 GrConfigConversionEffect::Create(NULL, 265 GrConfigConversionEffect::Create(NULL,
264 false, 266 false,
265 GrConfigConversionEffect::kNone_PMConversio n, 267 GrConfigConversionEffect::kNone_PMConversio n,
266 SkMatrix::I()); 268 SkMatrix::I());
267 SkScalar matrix[20]; 269 SkScalar matrix[20];
268 SkColorMatrixFilter cmf(matrix); 270 SkColorMatrixFilter cmf(matrix);
269 } 271 }
270 272
271 #endif 273 #endif
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698