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

Side by Side Diff: src/gpu/effects/GrCustomXfermode.cpp

Issue 1434313002: Make all GrFragmentProcessors GL independent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/gpu/effects/GrConvolutionEffect.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | 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 * 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
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 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvolutionEffect.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698