OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "effects/GrCustomXfermode.h" | 8 #include "effects/GrCustomXfermode.h" |
9 | 9 |
10 #include "GrCoordTransform.h" | 10 #include "GrCoordTransform.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory); | 388 GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory); |
389 const GrXPFactory* CustomXPFactory::TestCreate(GrProcessorTestData* d) { | 389 const GrXPFactory* CustomXPFactory::TestCreate(GrProcessorTestData* d) { |
390 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, | 390 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, |
391 SkXfermode::kLastSeparableMode); | 391 SkXfermode::kLastSeparableMode); |
392 | 392 |
393 return new CustomXPFactory(static_cast<SkXfermode::Mode>(mode)); | 393 return new CustomXPFactory(static_cast<SkXfermode::Mode>(mode)); |
394 } | 394 } |
395 | 395 |
396 /////////////////////////////////////////////////////////////////////////////// | 396 /////////////////////////////////////////////////////////////////////////////// |
397 | 397 |
398 GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { | 398 const GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { |
399 if (!GrCustomXfermode::IsSupportedMode(mode)) { | 399 if (!GrCustomXfermode::IsSupportedMode(mode)) { |
400 return nullptr; | 400 return nullptr; |
401 } else { | 401 } else { |
402 return new CustomXPFactory(mode); | 402 return new CustomXPFactory(mode); |
403 } | 403 } |
404 } | 404 } |
OLD | NEW |