electron/shell/browser/osr/osr_paint_event.cc
reito 1aeca6fd0e
feat: GPU shared texture offscreen rendering (#42953)
* feat: GPU shared texture offscreen rendering

* docs: clarify texture infos that passed by the paint event.

* feat: make gpu osr spec test optional

* fix: osr image compare

* fix: remove duplicate test

* fix: update patch file

* fix: code review

* feat: expose more metadata

* feat: use better switch design

* feat: add warning when user forget to release the texture.

* fix: typo

* chore: update patch

* fix: update patch

* fix: update patch description

* fix: update docs

* fix: apply suggestions from code review

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* fix: apply suggested fixes

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-08-22 19:23:13 -05:00

31 lines
1.4 KiB
C++

// Copyright (c) 2024 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include "shell/browser/osr/osr_paint_event.h"
namespace electron {
OffscreenNativePixmapPlaneInfo::~OffscreenNativePixmapPlaneInfo() = default;
OffscreenNativePixmapPlaneInfo::OffscreenNativePixmapPlaneInfo(
const OffscreenNativePixmapPlaneInfo& other) = default;
OffscreenNativePixmapPlaneInfo::OffscreenNativePixmapPlaneInfo(uint32_t stride,
uint64_t offset,
uint64_t size,
int fd)
: stride(stride), offset(offset), size(size), fd(fd) {}
OffscreenReleaserHolder::~OffscreenReleaserHolder() = default;
OffscreenReleaserHolder::OffscreenReleaserHolder(
gfx::GpuMemoryBufferHandle gmb_handle,
mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumerFrameCallbacks>
releaser)
: gmb_handle(std::move(gmb_handle)), releaser(std::move(releaser)) {}
OffscreenSharedTextureValue::OffscreenSharedTextureValue() = default;
OffscreenSharedTextureValue::~OffscreenSharedTextureValue() = default;
OffscreenSharedTextureValue::OffscreenSharedTextureValue(
const OffscreenSharedTextureValue& other) = default;
} // namespace electron