tor-browser

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

WebGLTextureUpload.h (1873B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      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/. */
      5 
      6 #ifndef WEBGLTEXTUREUPLOAD_H_
      7 #define WEBGLTEXTUREUPLOAD_H_
      8 
      9 #include "WebGLTypes.h"
     10 
     11 namespace mozilla {
     12 struct SurfaceFromElementResult;
     13 
     14 namespace dom {
     15 class Element;
     16 class OffscreenCanvas;
     17 }  // namespace dom
     18 
     19 namespace webgl {
     20 
     21 Maybe<TexUnpackBlobDesc> FromImageBitmap(GLenum target, Maybe<uvec3> size,
     22                                         const dom::ImageBitmap& imageBitmap,
     23                                         ErrorResult* const out_rv);
     24 
     25 Maybe<TexUnpackBlobDesc> FromOffscreenCanvas(const ClientWebGLContext& webgl,
     26                                             GLenum target, Maybe<uvec3> size,
     27                                             const dom::OffscreenCanvas& canvas,
     28                                             ErrorResult* const out_error);
     29 
     30 Maybe<TexUnpackBlobDesc> FromVideoFrame(const ClientWebGLContext& webgl,
     31                                        GLenum target, Maybe<uvec3> size,
     32                                        const dom::VideoFrame& videoFrame,
     33                                        ErrorResult* const out_error);
     34 
     35 Maybe<TexUnpackBlobDesc> FromDomElem(const ClientWebGLContext& webgl,
     36                                     GLenum target, Maybe<uvec3> size,
     37                                     const dom::Element& elem,
     38                                     ErrorResult* const out_error);
     39 
     40 Maybe<TexUnpackBlobDesc> FromSurfaceFromElementResult(
     41    const ClientWebGLContext& webgl, GLenum target, Maybe<uvec3> size,
     42    SurfaceFromElementResult& sfer, ErrorResult* const out_error);
     43 
     44 }  // namespace webgl
     45 }  // namespace mozilla
     46 
     47 #endif