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

Side by Side Diff: src/gpu/gl/GrGLXferProcessor.h

Issue 885923002: Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Back to bool Created 5 years, 10 months 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/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLXferProcessor.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 GrGLXferProcessor_DEFINED 8 #ifndef GrGLXferProcessor_DEFINED
9 #define GrGLXferProcessor_DEFINED 9 #define GrGLXferProcessor_DEFINED
10 10
11 #include "GrGLProcessor.h" 11 #include "GrGLProcessor.h"
12 12
13 class GrGLXPBuilder; 13 class GrGLXPBuilder;
14 class GrXferProcessor;
14 15
15 class GrGLXferProcessor { 16 class GrGLXferProcessor {
16 public: 17 public:
17 GrGLXferProcessor() {} 18 GrGLXferProcessor() {}
18 virtual ~GrGLXferProcessor() {} 19 virtual ~GrGLXferProcessor() {}
19 20
20 typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray; 21 typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray;
21 struct EmitArgs { 22 struct EmitArgs {
22 EmitArgs(GrGLXPBuilder* pb, 23 EmitArgs(GrGLXPBuilder* pb,
23 const GrXferProcessor& xp, 24 const GrXferProcessor& xp,
(...skipping 15 matching lines...) Expand all
39 const char* fInputColor; 40 const char* fInputColor;
40 const char* fInputCoverage; 41 const char* fInputCoverage;
41 const char* fOutputPrimary; 42 const char* fOutputPrimary;
42 const char* fOutputSecondary; 43 const char* fOutputSecondary;
43 const TextureSamplerArray& fSamplers; 44 const TextureSamplerArray& fSamplers;
44 }; 45 };
45 /** 46 /**
46 * This is similar to emitCode() in the base class, except it takes a full s hader builder. 47 * This is similar to emitCode() in the base class, except it takes a full s hader builder.
47 * This allows the effect subclass to emit vertex code. 48 * This allows the effect subclass to emit vertex code.
48 */ 49 */
49 virtual void emitCode(const EmitArgs&) = 0; 50 void emitCode(const EmitArgs&);
50 51
51 /** A GrGLXferProcessor instance can be reused with any GrGLXferProcessor th at produces 52 /** A GrGLXferProcessor instance can be reused with any GrGLXferProcessor th at produces
52 the same stage key; this function reads data from a GrGLXferProcessor an d uploads any 53 the same stage key; this function reads data from a GrGLXferProcessor an d uploads any
53 uniform variables required by the shaders created in emitCode(). The Gr XferProcessor 54 uniform variables required by the shaders created in emitCode(). The Gr XferProcessor
54 parameter is guaranteed to be of the same type that created this GrGLXfe rProcessor and 55 parameter is guaranteed to be of the same type that created this GrGLXfe rProcessor and
55 to have an identical processor key as the one that created this GrGLXfer Processor. */ 56 to have an identical processor key as the one that created this GrGLXfer Processor. This
56 virtual void setData(const GrGLProgramDataManager&, 57 function calls onSetData on the subclass of GrGLXferProcessor
57 const GrXferProcessor&) = 0; 58 */
59 void setData(const GrGLProgramDataManager& pdm, const GrXferProcessor& xp);
60
58 private: 61 private:
62 virtual void onEmitCode(const EmitArgs&) = 0;
63
64 virtual void onSetData(const GrGLProgramDataManager&, const GrXferProcessor& ) = 0;
65
66 GrGLProgramDataManager::UniformHandle fDstCopyTopLeftUni;
67 GrGLProgramDataManager::UniformHandle fDstCopyScaleUni;
68
59 typedef GrGLProcessor INHERITED; 69 typedef GrGLProcessor INHERITED;
60 }; 70 };
61 #endif 71 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/GrGLXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698