michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GFX_IMAGELAYERD3D9_H michael@0: #define GFX_IMAGELAYERD3D9_H michael@0: michael@0: #include "LayerManagerD3D9.h" michael@0: #include "ImageLayers.h" michael@0: #include "ImageContainer.h" michael@0: #include "yuv_convert.h" michael@0: michael@0: namespace mozilla { michael@0: namespace layers { michael@0: michael@0: class ImageLayerD3D9 : public ImageLayer, michael@0: public LayerD3D9 michael@0: { michael@0: public: michael@0: ImageLayerD3D9(LayerManagerD3D9 *aManager) michael@0: : ImageLayer(aManager, nullptr) michael@0: , LayerD3D9(aManager) michael@0: { michael@0: mImplData = static_cast(this); michael@0: } michael@0: michael@0: // LayerD3D9 Implementation michael@0: virtual Layer* GetLayer(); michael@0: michael@0: virtual void RenderLayer(); michael@0: michael@0: virtual already_AddRefed GetAsTexture(gfx::IntSize* aSize); michael@0: michael@0: private: michael@0: IDirect3DTexture9* GetTexture(Image *aImage, bool& aHasAlpha); michael@0: }; michael@0: michael@0: michael@0: struct TextureD3D9BackendData : public ImageBackendData michael@0: { michael@0: nsRefPtr mTexture; michael@0: }; michael@0: michael@0: struct PlanarYCbCrD3D9BackendData : public ImageBackendData michael@0: { michael@0: nsRefPtr mYTexture; michael@0: nsRefPtr mCrTexture; michael@0: nsRefPtr mCbTexture; michael@0: }; michael@0: michael@0: } /* layers */ michael@0: } /* mozilla */ michael@0: #endif /* GFX_IMAGELAYERD3D9_H */