mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-24 04:32:08 +00:00
This is a reland of commit f392c38b67ca8456d448076b70dca87db02bb990 The new added structure ImageCopyExternalTexture used in dawn only. Adding tags : ["dawn"] to fix compile error. Original change's description: > Add CopyExternalTextureForBrowser() > > This API accept ExternalTexture object as copy source and a dawn 2D texture > as destination. It has similar functions as CopyTextureForBrowser(). > The API is used to support cases that source images are multi-planar format > and want to do conversion and uploading to a dawn 2D texture. > > Bug: chromium:1361363 > Change-Id: Ie390acfb95b47d417f4a8faa2d1e19163d549154 > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105880 > Commit-Queue: Shaobo Yan <shaobo.yan@intel.com> > Reviewed-by: Austin Eng <enga@chromium.org> > Reviewed-by: Corentin Wallez <cwallez@chromium.org> Bug: chromium:1361363 Change-Id: I213c3dc7fe81ccc35050592e491995d0d5425f6e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106883 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
53 lines
2.4 KiB
C++
53 lines
2.4 KiB
C++
// Copyright 2020 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#ifndef SRC_DAWN_NATIVE_COPYTEXTUREFORBROWSERHELPER_H_
|
|
#define SRC_DAWN_NATIVE_COPYTEXTUREFORBROWSERHELPER_H_
|
|
|
|
#include "dawn/native/Error.h"
|
|
#include "dawn/native/ObjectBase.h"
|
|
|
|
namespace dawn::native {
|
|
class DeviceBase;
|
|
struct Extent3D;
|
|
struct ImageCopyTexture;
|
|
struct CopyTextureForBrowserOptions;
|
|
|
|
MaybeError ValidateCopyTextureForBrowser(DeviceBase* device,
|
|
const ImageCopyTexture* source,
|
|
const ImageCopyTexture* destination,
|
|
const Extent3D* copySize,
|
|
const CopyTextureForBrowserOptions* options);
|
|
|
|
MaybeError ValidateCopyExternalTextureForBrowser(DeviceBase* device,
|
|
const ImageCopyExternalTexture* source,
|
|
const ImageCopyTexture* destination,
|
|
const Extent3D* copySize,
|
|
const CopyTextureForBrowserOptions* options);
|
|
|
|
MaybeError DoCopyTextureForBrowser(DeviceBase* device,
|
|
const ImageCopyTexture* source,
|
|
const ImageCopyTexture* destination,
|
|
const Extent3D* copySize,
|
|
const CopyTextureForBrowserOptions* options);
|
|
|
|
MaybeError DoCopyExternalTextureForBrowser(DeviceBase* device,
|
|
const ImageCopyExternalTexture* source,
|
|
const ImageCopyTexture* destination,
|
|
const Extent3D* copySize,
|
|
const CopyTextureForBrowserOptions* options);
|
|
} // namespace dawn::native
|
|
|
|
#endif // SRC_DAWN_NATIVE_COPYTEXTUREFORBROWSERHELPER_H_
|