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

Side by Side Diff: src/gpu/effects/GrCustomXfermodePriv.h

Issue 844913003: Move XferEffects class to GrCustomXfermode file (Closed) Base URL: https://skia.googlesource.com/skia.git@arithXP
Patch Set: Fix build Created 5 years, 11 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/effects/GrCustomXfermode.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrCustomXfermodePriv_DEFINED
9 #define GrCustomXfermodePriv_DEFINED
10
11 #include "GrCoordTransform.h"
12 #include "GrFragmentProcessor.h"
13 #include "GrTextureAccess.h"
14 #include "SkXfermode.h"
15
16 class GrGLCaps;
17 class GrGLFragmentProcessor;
18 class GrInvariantOutput;
19 class GrProcessorKeyBuilder;
20 class GrTexture;
21
22 ///////////////////////////////////////////////////////////////////////////////
23 // Fragment Processor
24 ///////////////////////////////////////////////////////////////////////////////
25
26 class GrCustomXferFP : public GrFragmentProcessor {
27 public:
28 GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background);
29
30 void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
31
32 GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE;
33
34 const char* name() const SK_OVERRIDE { return "Custom Xfermode"; }
35
36 SkXfermode::Mode mode() const { return fMode; }
37 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; }
38
39 private:
40 bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE;
41
42 void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
43
44 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
45
46 SkXfermode::Mode fMode;
47 GrCoordTransform fBackgroundTransform;
48 GrTextureAccess fBackgroundAccess;
49
50 typedef GrFragmentProcessor INHERITED;
51 };
52
53 #endif
54
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698