LCOV - code coverage report
Current view: top level - gfx/skia/skia/src/gpu/effects - GrBitmapTextGeoProc.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 13 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 12 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright 2013 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 GrBitmapTextGeoProc_DEFINED
       9             : #define GrBitmapTextGeoProc_DEFINED
      10             : 
      11             : #include "GrProcessor.h"
      12             : #include "GrGeometryProcessor.h"
      13             : 
      14             : class GrGLBitmapTextGeoProc;
      15             : class GrInvariantOutput;
      16             : 
      17             : /**
      18             :  * The output color of this effect is a modulation of the input color and a sample from a texture.
      19             :  * It allows explicit specification of the filtering and wrap modes (GrSamplerParams). The input
      20             :  * coords are a custom attribute.
      21             :  */
      22             : class GrBitmapTextGeoProc : public GrGeometryProcessor {
      23             : public:
      24           0 :     static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color,
      25             :                                            sk_sp<GrTextureProxy> proxy, const GrSamplerParams& p,
      26             :                                            GrMaskFormat format, const SkMatrix& localMatrix,
      27             :                                            bool usesLocalCoords) {
      28             :         return sk_sp<GrGeometryProcessor>(
      29           0 :             new GrBitmapTextGeoProc(resourceProvider, color, std::move(proxy), p, format,
      30           0 :                                     localMatrix, usesLocalCoords));
      31             :     }
      32             : 
      33           0 :     ~GrBitmapTextGeoProc() override {}
      34             : 
      35           0 :     const char* name() const override { return "Texture"; }
      36             : 
      37           0 :     const Attribute* inPosition() const { return fInPosition; }
      38           0 :     const Attribute* inColor() const { return fInColor; }
      39           0 :     const Attribute* inTextureCoords() const { return fInTextureCoords; }
      40           0 :     GrMaskFormat maskFormat() const { return fMaskFormat; }
      41           0 :     GrColor color() const { return fColor; }
      42           0 :     bool hasVertexColor() const { return SkToBool(fInColor); }
      43           0 :     const SkMatrix& localMatrix() const { return fLocalMatrix; }
      44           0 :     bool usesLocalCoords() const { return fUsesLocalCoords; }
      45             : 
      46             :     void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
      47             : 
      48             :     GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps& caps) const override;
      49             : 
      50             : private:
      51             :     GrBitmapTextGeoProc(GrResourceProvider*, GrColor, sk_sp<GrTextureProxy>,
      52             :                         const GrSamplerParams& params,
      53             :                         GrMaskFormat format, const SkMatrix& localMatrix, bool usesLocalCoords);
      54             : 
      55             :     GrColor          fColor;
      56             :     SkMatrix         fLocalMatrix;
      57             :     bool             fUsesLocalCoords;
      58             :     TextureSampler   fTextureSampler;
      59             :     const Attribute* fInPosition;
      60             :     const Attribute* fInColor;
      61             :     const Attribute* fInTextureCoords;
      62             :     GrMaskFormat     fMaskFormat;
      63             : 
      64             :     GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
      65             : 
      66             :     typedef GrGeometryProcessor INHERITED;
      67             : };
      68             : 
      69             : #endif

Generated by: LCOV version 1.13