mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
131bfce4c5
--HG-- rename : gfx/layers/basic/BasicThebesLayer.cpp => gfx/layers/basic/BasicPaintedLayer.cpp rename : gfx/layers/basic/BasicThebesLayer.h => gfx/layers/basic/BasicPaintedLayer.h rename : gfx/layers/client/ClientThebesLayer.cpp => gfx/layers/client/ClientPaintedLayer.cpp rename : gfx/layers/client/ClientThebesLayer.h => gfx/layers/client/ClientPaintedLayer.h rename : gfx/layers/client/ClientTiledThebesLayer.cpp => gfx/layers/client/ClientTiledPaintedLayer.cpp rename : gfx/layers/client/ClientTiledThebesLayer.h => gfx/layers/client/ClientTiledPaintedLayer.h rename : gfx/layers/composite/ThebesLayerComposite.cpp => gfx/layers/composite/PaintedLayerComposite.cpp rename : gfx/layers/composite/ThebesLayerComposite.h => gfx/layers/composite/PaintedLayerComposite.h rename : gfx/layers/d3d10/ThebesLayerD3D10.cpp => gfx/layers/d3d10/PaintedLayerD3D10.cpp rename : gfx/layers/d3d10/ThebesLayerD3D10.h => gfx/layers/d3d10/PaintedLayerD3D10.h rename : gfx/layers/d3d9/ThebesLayerD3D9.cpp => gfx/layers/d3d9/PaintedLayerD3D9.cpp rename : gfx/layers/d3d9/ThebesLayerD3D9.h => gfx/layers/d3d9/PaintedLayerD3D9.h
74 lines
2.3 KiB
C++
74 lines
2.3 KiB
C++
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef GFX_PAINTEDLAYERD3D10_H
|
|
#define GFX_PAINTEDLAYERD3D10_H
|
|
|
|
#include "LayerManagerD3D10.h"
|
|
|
|
namespace mozilla {
|
|
namespace layers {
|
|
|
|
class PaintedLayerD3D10 : public PaintedLayer,
|
|
public LayerD3D10
|
|
{
|
|
public:
|
|
PaintedLayerD3D10(LayerManagerD3D10 *aManager);
|
|
virtual ~PaintedLayerD3D10();
|
|
|
|
void Validate(ReadbackProcessor *aReadback);
|
|
|
|
/* PaintedLayer implementation */
|
|
void InvalidateRegion(const nsIntRegion& aRegion);
|
|
|
|
/* LayerD3D10 implementation */
|
|
virtual Layer* GetLayer();
|
|
virtual void RenderLayer();
|
|
virtual void Validate() { Validate(nullptr); }
|
|
virtual void LayerManagerDestroyed();
|
|
|
|
private:
|
|
/* Texture with our surface data */
|
|
nsRefPtr<ID3D10Texture2D> mTexture;
|
|
|
|
/* Shader resource view for our texture */
|
|
nsRefPtr<ID3D10ShaderResourceView> mSRView;
|
|
|
|
/* Texture for render-on-whitew when doing component alpha */
|
|
nsRefPtr<ID3D10Texture2D> mTextureOnWhite;
|
|
|
|
/* Shader resource view for our render-on-white texture */
|
|
nsRefPtr<ID3D10ShaderResourceView> mSRViewOnWhite;
|
|
|
|
/* Area of layer currently stored in texture(s) */
|
|
nsIntRect mTextureRect;
|
|
|
|
/* Last surface mode set in Validate() */
|
|
SurfaceMode mCurrentSurfaceMode;
|
|
|
|
/* Checks if our D2D surface has the right content type */
|
|
void VerifyContentType(SurfaceMode aMode);
|
|
|
|
mozilla::RefPtr<mozilla::gfx::DrawTarget> mDrawTarget;
|
|
|
|
/* Have a region of our layer drawn */
|
|
void DrawRegion(nsIntRegion &aRegion, SurfaceMode aMode);
|
|
|
|
/* Create a new texture */
|
|
void CreateNewTextures(const gfx::IntSize &aSize, SurfaceMode aMode);
|
|
|
|
// Fill textures with opaque black and white in the specified region.
|
|
void FillTexturesBlackWhite(const nsIntRegion& aRegion, const nsIntPoint& aOffset);
|
|
|
|
/* Copy a texture region */
|
|
void CopyRegion(ID3D10Texture2D* aSrc, const nsIntPoint &aSrcOffset,
|
|
ID3D10Texture2D* aDest, const nsIntPoint &aDestOffset,
|
|
const nsIntRegion &aCopyRegion, nsIntRegion* aValidRegion);
|
|
};
|
|
|
|
} /* layers */
|
|
} /* mozilla */
|
|
#endif /* GFX_PAINTEDLAYERD3D10_H */
|