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 #include "SkBitmapAlphaThresholdShader.h" | 258 #include "SkBitmapAlphaThresholdShader.h" |
258 | 259 |
259 void forceLinking(); | 260 void forceLinking(); |
260 | 261 |
261 void forceLinking() { | 262 void forceLinking() { |
262 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); | 263 SkLightingImageFilter::CreateDistantLitDiffuse(SkPoint3(0,0,0), 0, 0, 0); |
| 264 SkAlphaThresholdFilter alpha_thresh(SkRegion(), .5, .5); |
263 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); | 265 SkMagnifierImageFilter mag(SkRect::MakeWH(SK_Scalar1, SK_Scalar1), SK_Scalar
1); |
264 GrConfigConversionEffect::Create(NULL, | 266 GrConfigConversionEffect::Create(NULL, |
265 false, | 267 false, |
266 GrConfigConversionEffect::kNone_PMConversio
n, | 268 GrConfigConversionEffect::kNone_PMConversio
n, |
267 SkMatrix::I()); | 269 SkMatrix::I()); |
268 SkScalar matrix[20]; | 270 SkScalar matrix[20]; |
269 SkColorMatrixFilter cmf(matrix); | 271 SkColorMatrixFilter cmf(matrix); |
270 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); | 272 SkBitmapAlphaThresholdShader::Create(SkBitmap(), SkRegion(), 0x80); |
271 } | 273 } |
272 | 274 |
273 #endif | 275 #endif |
OLD | NEW |