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

Side by Side Diff: include/gpu/GrXferProcessor.h

Issue 1440073002: Move XferProcessors to glsl (Closed) Base URL: https://skia.googlesource.com/skia.git@fragProcs
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 | « gyp/gpu.gypi ('k') | src/effects/SkArithmeticMode_gpu.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef GrXferProcessor_DEFINED 8 #ifndef GrXferProcessor_DEFINED
9 #define GrXferProcessor_DEFINED 9 #define GrXferProcessor_DEFINED
10 10
11 #include "GrBlend.h" 11 #include "GrBlend.h"
12 #include "GrColor.h" 12 #include "GrColor.h"
13 #include "GrProcessor.h" 13 #include "GrProcessor.h"
14 #include "GrTexture.h" 14 #include "GrTexture.h"
15 #include "GrTypes.h" 15 #include "GrTypes.h"
16 #include "SkXfermode.h" 16 #include "SkXfermode.h"
17 17
18 class GrShaderCaps; 18 class GrShaderCaps;
19 class GrGLSLCaps; 19 class GrGLSLCaps;
20 class GrGLXferProcessor; 20 class GrGLSLXferProcessor;
21 class GrProcOptInfo; 21 class GrProcOptInfo;
22 22
23 /** 23 /**
24 * Barriers for blending. When a shader reads the dst directly, an Xfer barrier is sometimes 24 * Barriers for blending. When a shader reads the dst directly, an Xfer barrier is sometimes
25 * required after a pixel has been written, before it can be safely read again. 25 * required after a pixel has been written, before it can be safely read again.
26 */ 26 */
27 enum GrXferBarrierType { 27 enum GrXferBarrierType {
28 kNone_GrXferBarrierType = 0, //<! No barrier is required 28 kNone_GrXferBarrierType = 0, //<! No barrier is required
29 kTexture_GrXferBarrierType, //<! Required when a shader reads and renders t o the same texture. 29 kTexture_GrXferBarrierType, //<! Required when a shader reads and renders t o the same texture.
30 kBlend_GrXferBarrierType, //<! Required by certain blend extensions. 30 kBlend_GrXferBarrierType, //<! Required by certain blend extensions.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 /** 94 /**
95 * Sets a unique key on the GrProcessorKeyBuilder calls onGetGLProcessorKey( ...) to get the 95 * Sets a unique key on the GrProcessorKeyBuilder calls onGetGLProcessorKey( ...) to get the
96 * specific subclass's key. 96 * specific subclass's key.
97 */ 97 */
98 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st; 98 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st;
99 99
100 /** Returns a new instance of the appropriate *GL* implementation class 100 /** Returns a new instance of the appropriate *GL* implementation class
101 for the given GrXferProcessor; caller is responsible for deleting 101 for the given GrXferProcessor; caller is responsible for deleting
102 the object. */ 102 the object. */
103 virtual GrGLXferProcessor* createGLInstance() const = 0; 103 virtual GrGLSLXferProcessor* createGLInstance() const = 0;
104 104
105 /** 105 /**
106 * Optimizations for blending / coverage that an OptDrawState should apply t o itself. 106 * Optimizations for blending / coverage that an OptDrawState should apply t o itself.
107 */ 107 */
108 enum OptFlags { 108 enum OptFlags {
109 /** 109 /**
110 * The draw can be skipped completely. 110 * The draw can be skipped completely.
111 */ 111 */
112 kSkipDraw_OptFlag = 0x1, 112 kSkipDraw_OptFlag = 0x1,
113 /** 113 /**
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 enum { 400 enum {
401 kIllegalXPFClassID = 0, 401 kIllegalXPFClassID = 0,
402 }; 402 };
403 static int32_t gCurrXPFClassID; 403 static int32_t gCurrXPFClassID;
404 404
405 typedef GrProgramElement INHERITED; 405 typedef GrProgramElement INHERITED;
406 }; 406 };
407 407
408 #endif 408 #endif
409 409
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698