LCOV - code coverage report
Current view: top level - gfx/layers/composite - ColorLayerComposite.h (source / functions) Hit Total Coverage
Test: output.info Lines: 16 21 76.2 %
Date: 2017-07-14 16:53:18 Functions: 8 10 80.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef GFX_ColorLayerComposite_H
       7             : #define GFX_ColorLayerComposite_H
       8             : 
       9             : #include "Layers.h"                     // for ColorLayer, etc
      10             : #include "mozilla/Attributes.h"         // for override
      11             : #include "mozilla/layers/LayerManagerComposite.h"  // for LayerComposite, etc
      12             : #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
      13             : 
      14             : namespace mozilla {
      15             : namespace layers {
      16             : 
      17             : class CompositableHost;
      18             : 
      19             : class ColorLayerComposite : public ColorLayer,
      20             :                             public LayerComposite
      21             : {
      22             : public:
      23           4 :   explicit ColorLayerComposite(LayerManagerComposite *aManager)
      24           4 :     : ColorLayer(aManager, nullptr)
      25           4 :     , LayerComposite(aManager)
      26             :   {
      27           4 :     MOZ_COUNT_CTOR(ColorLayerComposite);
      28           4 :     mImplData = static_cast<LayerComposite*>(this);
      29           4 :   }
      30             : 
      31             : protected:
      32           4 :   ~ColorLayerComposite()
      33           4 :   {
      34           2 :     MOZ_COUNT_DTOR(ColorLayerComposite);
      35           2 :     Destroy();
      36           6 :   }
      37             : 
      38             : public:
      39             :   // LayerComposite Implementation
      40         299 :   virtual Layer* GetLayer() override { return this; }
      41             : 
      42           0 :   virtual void SetLayerManager(HostLayerManager* aManager) override
      43             :   {
      44           0 :     LayerComposite::SetLayerManager(aManager);
      45           0 :     mManager = aManager;
      46           0 :   }
      47             : 
      48           2 :   virtual void Destroy() override { mDestroyed = true; }
      49             : 
      50             :   virtual void RenderLayer(const gfx::IntRect& aClipRect,
      51             :                            const Maybe<gfx::Polygon>& aGeometry) override;
      52             : 
      53           0 :   virtual void CleanupResources() override {};
      54             : 
      55             :   virtual void GenEffectChain(EffectChain& aEffect) override;
      56             : 
      57          11 :   CompositableHost* GetCompositableHost() override { return nullptr; }
      58             : 
      59         747 :   virtual HostLayer* AsHostLayer() override { return this; }
      60             : 
      61          31 :   virtual const char* Name() const override { return "ColorLayerComposite"; }
      62             : };
      63             : 
      64             : } // namespace layers
      65             : } // namespace mozilla
      66             : 
      67             : #endif /* GFX_ColorLayerComposite_H */

Generated by: LCOV version 1.13