| Index: src/gpu/effects/GrCustomXfermodePriv.h
|
| diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0c8035111e0c6fb97c665d843b060c10b162eefa
|
| --- /dev/null
|
| +++ b/src/gpu/effects/GrCustomXfermodePriv.h
|
| @@ -0,0 +1,54 @@
|
| +/*
|
| + * Copyright 2015 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef GrCustomXfermodePriv_DEFINED
|
| +#define GrCustomXfermodePriv_DEFINED
|
| +
|
| +#include "GrCoordTransform.h"
|
| +#include "GrFragmentProcessor.h"
|
| +#include "GrTextureAccess.h"
|
| +#include "SkXfermode.h"
|
| +
|
| +class GrGLCaps;
|
| +class GrGLFragmentProcessor;
|
| +class GrInvariantOutput;
|
| +class GrProcessorKeyBuilder;
|
| +class GrTexture;
|
| +
|
| +///////////////////////////////////////////////////////////////////////////////
|
| +// Fragment Processor
|
| +///////////////////////////////////////////////////////////////////////////////
|
| +
|
| +class GrCustomXferFP : public GrFragmentProcessor {
|
| +public:
|
| + GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background);
|
| +
|
| + void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
|
| +
|
| + GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE;
|
| +
|
| + const char* name() const SK_OVERRIDE { return "Custom Xfermode"; }
|
| +
|
| + SkXfermode::Mode mode() const { return fMode; }
|
| + const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; }
|
| +
|
| +private:
|
| + bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE;
|
| +
|
| + void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
|
| +
|
| + GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
|
| +
|
| + SkXfermode::Mode fMode;
|
| + GrCoordTransform fBackgroundTransform;
|
| + GrTextureAccess fBackgroundAccess;
|
| +
|
| + typedef GrFragmentProcessor INHERITED;
|
| +};
|
| +
|
| +#endif
|
| +
|
|
|