OLD | NEW |
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 Loading... |
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 |
OLD | NEW |