tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

StreamProducerD3DTexture.h (1292B)


      1 //
      2 // Copyright 2016 The ANGLE Project Authors. All rights reserved.
      3 // Use of this source code is governed by a BSD-style license that can be
      4 // found in the LICENSE file.
      5 //
      6 
      7 // StreamProducerD3DTexture.h: Interface for a D3D11 texture stream producer
      8 
      9 #ifndef LIBANGLE_RENDERER_D3D_D3D11_STREAM11_H_
     10 #define LIBANGLE_RENDERER_D3D_D3D11_STREAM11_H_
     11 
     12 #include "libANGLE/renderer/StreamProducerImpl.h"
     13 
     14 namespace rx
     15 {
     16 class Renderer11;
     17 
     18 class StreamProducerD3DTexture : public StreamProducerImpl
     19 {
     20  public:
     21    StreamProducerD3DTexture(Renderer11 *renderer);
     22    ~StreamProducerD3DTexture() override;
     23 
     24    egl::Error validateD3DTexture(const void *pointer,
     25                                  const egl::AttributeMap &attributes) const override;
     26    void postD3DTexture(void *pointer, const egl::AttributeMap &attributes) override;
     27    egl::Stream::GLTextureDescription getGLFrameDescription(int planeIndex) override;
     28 
     29    // Gets a pointer to the internal D3D texture
     30    ID3D11Texture2D *getD3DTexture();
     31 
     32    // Gets the slice index for the D3D texture that the frame is in
     33    UINT getArraySlice();
     34 
     35  private:
     36    Renderer11 *mRenderer;
     37 
     38    ID3D11Texture2D *mTexture;
     39    UINT mArraySlice;
     40    UINT mPlaneOffset;
     41 };
     42 }  // namespace rx
     43 
     44 #endif  // LIBANGLE_RENDERER_D3D_D3D11_STREAM11_H_