Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
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/. */
6 #ifndef GFX_IMAGELAYERD3D9_H
7 #define GFX_IMAGELAYERD3D9_H
9 #include "LayerManagerD3D9.h"
10 #include "ImageLayers.h"
11 #include "ImageContainer.h"
12 #include "yuv_convert.h"
14 namespace mozilla {
15 namespace layers {
17 class ImageLayerD3D9 : public ImageLayer,
18 public LayerD3D9
19 {
20 public:
21 ImageLayerD3D9(LayerManagerD3D9 *aManager)
22 : ImageLayer(aManager, nullptr)
23 , LayerD3D9(aManager)
24 {
25 mImplData = static_cast<LayerD3D9*>(this);
26 }
28 // LayerD3D9 Implementation
29 virtual Layer* GetLayer();
31 virtual void RenderLayer();
33 virtual already_AddRefed<IDirect3DTexture9> GetAsTexture(gfx::IntSize* aSize);
35 private:
36 IDirect3DTexture9* GetTexture(Image *aImage, bool& aHasAlpha);
37 };
40 struct TextureD3D9BackendData : public ImageBackendData
41 {
42 nsRefPtr<IDirect3DTexture9> mTexture;
43 };
45 struct PlanarYCbCrD3D9BackendData : public ImageBackendData
46 {
47 nsRefPtr<IDirect3DTexture9> mYTexture;
48 nsRefPtr<IDirect3DTexture9> mCrTexture;
49 nsRefPtr<IDirect3DTexture9> mCbTexture;
50 };
52 } /* layers */
53 } /* mozilla */
54 #endif /* GFX_IMAGELAYERD3D9_H */