Host presentation adapter for isolated stylize preview readback. 更多...
#include <EditorStylizeTarget.h>
Public 成员函数 | |
| StylizeOffscreenPreviewService (GraphicsOffscreenPreviewService *previews, graphics::Graphics *graphics) | |
| Borrow the preview service and graphics backend; neither is owned. | |
| Result< OffscreenPreviewArtifact > | render (const StylizeRecipeTarget &document, graphics::Texture *source, const StableId &previewId, int width, int height) const |
| Render a revision-bound preview without changing the source document. | |
详细描述
Host presentation adapter for isolated stylize preview readback.
在文件 EditorStylizeTarget.h 第 15 行定义.
构造及析构函数说明
◆ StylizeOffscreenPreviewService()
|
inline |
Borrow the preview service and graphics backend; neither is owned.
- 参数
-
previews Borrowed service that must outlive this adapter; nullable for unavailable-provider handling. graphics Borrowed backend that must outlive this adapter; nullable for unavailable-provider handling. @thread Render-owner thread only.
Previews.
在文件 EditorStylizeTarget.h 第 23 行定义.
成员函数说明
◆ render()
| Result< OffscreenPreviewArtifact > eve::editor::StylizeOffscreenPreviewService::render | ( | const StylizeRecipeTarget & | document, |
| graphics::Texture * | source, | ||
| const StableId & | previewId, | ||
| int | width, | ||
| int | height | ||
| ) | const |
Render a revision-bound preview without changing the source document.
- 参数
-
document Borrowed authoring document, valid for this synchronous call. source Borrowed source texture, valid until the preview call returns. previewId Stable identity of the preview artifact. width Requested output width. height Requested output height.
- 返回
- Owning artifact or structured admission, publication or backend failure. @thread Render-owner thread only; the draw callback runs synchronously through the preview service. @cost Expensive GPU rendering and readback per requested preview; amortize by source revision.
在文件 EditorStylizeOffscreen.cpp 第 7 行定义.
引用了 eve::stylize_editing::StylizeRecipeRuntime::apply(), eve::UuidIdAdapter< Tag >::empty(), eve::Result< T >::failure(), graphics, height, eve::graphics_editing::OffscreenPreviewRequest::previewId, eve::stylize_editing::StylizeRecipeRuntime::publish(), eve::graphics_editing::GraphicsOffscreenPreviewService::render(), request, eve::editing::EditableTargetState::revision(), source , 以及 width.
该类的文档由以下文件生成:
- src/modules/stylize/editor/EditorStylizeTarget.h
- src/modules/stylize/editor/EditorStylizeOffscreen.cpp