| 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" |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "GrFragmentProcessor.h" | 12 #include "GrFragmentProcessor.h" |
| 13 #include "GrInvariantOutput.h" | 13 #include "GrInvariantOutput.h" |
| 14 #include "GrProcessor.h" | 14 #include "GrProcessor.h" |
| 15 #include "GrTexture.h" | 15 #include "GrTexture.h" |
| 16 #include "GrTextureAccess.h" | 16 #include "GrTextureAccess.h" |
| 17 #include "SkXfermode.h" | 17 #include "SkXfermode.h" |
| 18 #include "gl/GrGLCaps.h" | 18 #include "gl/GrGLXferProcessor.h" |
| 19 #include "gl/GrGLGpu.h" | 19 #include "glsl/GrGLSLBlend.h" |
| 20 #include "gl/GrGLSLBlend.h" | |
| 21 #include "gl/GrGLFragmentProcessor.h" | |
| 22 #include "gl/GrGLProgramDataManager.h" | |
| 23 #include "glsl/GrGLSLCaps.h" | 20 #include "glsl/GrGLSLCaps.h" |
| 21 #include "glsl/GrGLSLFragmentProcessor.h" |
| 24 #include "glsl/GrGLSLFragmentShaderBuilder.h" | 22 #include "glsl/GrGLSLFragmentShaderBuilder.h" |
| 25 #include "glsl/GrGLSLProgramBuilder.h" | 23 #include "glsl/GrGLSLProgramBuilder.h" |
| 26 #include "glsl/GrGLSLProgramDataManager.h" | 24 #include "glsl/GrGLSLProgramDataManager.h" |
| 27 | 25 |
| 28 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { | 26 bool GrCustomXfermode::IsSupportedMode(SkXfermode::Mode mode) { |
| 29 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; | 27 return mode > SkXfermode::kLastCoeffMode && mode <= SkXfermode::kLastMode; |
| 30 } | 28 } |
| 31 | 29 |
| 32 /////////////////////////////////////////////////////////////////////////////// | 30 /////////////////////////////////////////////////////////////////////////////// |
| 33 // Static helpers | 31 // Static helpers |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 392 |
| 395 /////////////////////////////////////////////////////////////////////////////// | 393 /////////////////////////////////////////////////////////////////////////////// |
| 396 | 394 |
| 397 GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { | 395 GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { |
| 398 if (!GrCustomXfermode::IsSupportedMode(mode)) { | 396 if (!GrCustomXfermode::IsSupportedMode(mode)) { |
| 399 return nullptr; | 397 return nullptr; |
| 400 } else { | 398 } else { |
| 401 return new CustomXPFactory(mode); | 399 return new CustomXPFactory(mode); |
| 402 } | 400 } |
| 403 } | 401 } |
| OLD | NEW |