LCOV - code coverage report
Current view: top level - gfx/layers/wr - WebRenderPaintedLayerBlob.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 17 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; 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_WEBRENDERPAINTEDLAYERBLOB_H
       7             : #define GFX_WEBRENDERPAINTEDLAYERBLOB_H
       8             : 
       9             : #include "Layers.h"
      10             : #include "mozilla/layers/ContentClient.h"
      11             : #include "mozilla/layers/WebRenderBridgeChild.h"
      12             : #include "mozilla/layers/WebRenderLayer.h"
      13             : #include "mozilla/layers/WebRenderLayerManager.h"
      14             : #include "mozilla/webrender/WebRenderTypes.h"
      15             : 
      16             : namespace mozilla {
      17             : namespace layers {
      18             : 
      19             : class WebRenderPaintedLayerBlob : public WebRenderLayer,
      20             :                                   public PaintedLayer {
      21             : public:
      22             :   typedef RotatedContentBuffer::PaintState PaintState;
      23             :   typedef RotatedContentBuffer::ContentType ContentType;
      24             : 
      25           0 :   explicit WebRenderPaintedLayerBlob(WebRenderLayerManager* aLayerManager)
      26           0 :     : PaintedLayer(aLayerManager, static_cast<WebRenderLayer*>(this), LayerManager::NONE)
      27             :   {
      28           0 :     MOZ_COUNT_CTOR(WebRenderPaintedLayerBlob);
      29           0 :   }
      30             : 
      31             : protected:
      32           0 :   virtual ~WebRenderPaintedLayerBlob()
      33           0 :   {
      34           0 :     MOZ_COUNT_DTOR(WebRenderPaintedLayerBlob);
      35           0 :     if (mExternalImageId.isSome()) {
      36           0 :       WrBridge()->DeallocExternalImageId(mExternalImageId.ref());
      37             :     }
      38           0 :     if (mImageKey.isSome()) {
      39           0 :       WrManager()->AddImageKeyForDiscard(mImageKey.value());
      40             :     }
      41           0 :   }
      42             : 
      43             :   wr::MaybeExternalImageId mExternalImageId;
      44             : 
      45             : public:
      46           0 :   virtual void InvalidateRegion(const nsIntRegion& aRegion) override
      47             :   {
      48           0 :     mInvalidRegion.Add(aRegion);
      49           0 :     UpdateValidRegionAfterInvalidRegionChanged();
      50           0 :   }
      51             : 
      52           0 :   Layer* GetLayer() override { return this; }
      53             :   void RenderLayer(wr::DisplayListBuilder& aBuilder,
      54             :                    const StackingContextHelper& aSc) override;
      55             : private:
      56             :   Maybe<WrImageKey> mImageKey;
      57             :   LayerIntRect mImageBounds;
      58             : };
      59             : 
      60             : } // namespace layers
      61             : } // namespace mozilla
      62             : 
      63             : #endif // GFX_WEBRENDERPAINTEDLAYERBLOB_H

Generated by: LCOV version 1.13