Backed out 4 changesets (bug 1858627) for causing clipboard/paste failures. CLOSED...
[gecko.git] / dom / canvas / WebGLTextureUpload.h
blob6ab1ced4c5a59b53a1ec9d588cd6faefd748c8c1
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/. */
6 #ifndef WEBGLTEXTUREUPLOAD_H_
7 #define WEBGLTEXTUREUPLOAD_H_
9 #include "WebGLTypes.h"
11 namespace mozilla {
12 struct SurfaceFromElementResult;
14 namespace dom {
15 class Element;
16 class OffscreenCanvas;
17 } // namespace dom
19 namespace webgl {
21 Maybe<TexUnpackBlobDesc> FromImageBitmap(GLenum target, Maybe<uvec3> size,
22 const dom::ImageBitmap& imageBitmap,
23 ErrorResult* const out_rv);
25 Maybe<TexUnpackBlobDesc> FromOffscreenCanvas(const ClientWebGLContext& webgl,
26 GLenum target, Maybe<uvec3> size,
27 const dom::OffscreenCanvas& canvas,
28 ErrorResult* const out_error);
30 Maybe<TexUnpackBlobDesc> FromVideoFrame(const ClientWebGLContext& webgl,
31 GLenum target, Maybe<uvec3> size,
32 const dom::VideoFrame& videoFrame,
33 ErrorResult* const out_error);
35 Maybe<TexUnpackBlobDesc> FromDomElem(const ClientWebGLContext& webgl,
36 GLenum target, Maybe<uvec3> size,
37 const dom::Element& elem,
38 ErrorResult* const out_error);
40 Maybe<TexUnpackBlobDesc> FromSurfaceFromElementResult(
41 const ClientWebGLContext& webgl, GLenum target, Maybe<uvec3> size,
42 SurfaceFromElementResult& sfer, ErrorResult* const out_error);
44 } // namespace webgl
45 } // namespace mozilla
47 #endif