gecko-dev/gfx/webrender_bindings/RenderTextureHostOGL.h
JerryShih f488575a07 Bug 1357299 - P3: Support DXGI texture type for WR. v2. r=nical
Create the corresponding RenderTextureHost type and WR commands for DXGI texture type.

The DXGITextureHostD3D11 will use 1 or 2 image keys for non-nv12 and nv12 texture format.

The DXGIYCbCrTextureHostD3D11 is a special case. The WR uses ANGLE in windows platform,
but the ANGLE doesn't support A8 format directx texture directly. So, we use libyuv to
convert the DXGIYCbCrTextureHostD3D11 texture buffer into RGBA format buffer and use
WR::AddImage() for that image. This is a slow code path. We will refine this case later.

The whole RenderD3D11TextureHostOGL implementation is in the next patch.

MozReview-Commit-ID: F4mPCALj1OY
2017-08-07 18:15:22 +08:00

39 lines
970 B
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 MOZILLA_GFX_RENDERTEXTUREHOSTOGL_H
#define MOZILLA_GFX_RENDERTEXTUREHOSTOGL_H
#include "RenderTextureHost.h"
namespace mozilla {
namespace gl {
class GLContext;
}
namespace wr {
class RenderTextureHostOGL : public RenderTextureHost
{
public:
RenderTextureHostOGL();
virtual void SetGLContext(gl::GLContext* aContext) = 0;
virtual gfx::IntSize GetSize(uint8_t aChannelIndex) const = 0;
virtual GLuint GetGLHandle(uint8_t aChannelIndex) const = 0;
virtual RenderTextureHostOGL* AsTextureHostOGL() override { return this; }
protected:
virtual ~RenderTextureHostOGL();
};
} // namespace wr
} // namespace mozilla
#endif // MOZILLA_GFX_RENDERTEXTUREHOSTOGL_H