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

          Line data    Source code
       1             : /*
       2             :  * Copyright 2016 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 GrColorSpaceXform_DEFINED
       9             : #define GrColorSpaceXform_DEFINED
      10             : 
      11             : #include "GrColor.h"
      12             : #include "SkMatrix44.h"
      13             : #include "SkRefCnt.h"
      14             : 
      15             : class SkColorSpace;
      16             : 
      17             :  /**
      18             :   * Represents a color gamut transformation (as a 4x4 color matrix)
      19             :   */
      20           0 : class GrColorSpaceXform : public SkRefCnt {
      21             : public:
      22             :     GrColorSpaceXform(const SkMatrix44& srcToDst);
      23             : 
      24             :     static sk_sp<GrColorSpaceXform> Make(const SkColorSpace* src, const SkColorSpace* dst);
      25             : 
      26           0 :     const SkMatrix44& srcToDst() const { return fSrcToDst; }
      27             : 
      28             :     /**
      29             :      * GrGLSLFragmentProcessor::GenKey() must call this and include the returned value in its
      30             :      * computed key.
      31             :      */
      32           0 :     static uint32_t XformKey(const GrColorSpaceXform* xform) {
      33             :         // Code generation changes if there is an xform, but it otherwise constant
      34           0 :         return SkToBool(xform) ? 1 : 0;
      35             :     }
      36             : 
      37             :     static bool Equals(const GrColorSpaceXform* a, const GrColorSpaceXform* b);
      38             : 
      39             :     GrColor4f apply(const GrColor4f& srcColor);
      40             : 
      41             : private:
      42             :     SkMatrix44 fSrcToDst;
      43             : };
      44             : 
      45             : #endif

Generated by: LCOV version 1.13