gfx: add GfxBlendBuffer
This commit is contained in:
parent
446779ab83
commit
a7cb2ee42a
14 changed files with 107 additions and 23 deletions
|
|
@ -4,8 +4,8 @@ use {
|
|||
cpu_worker::CpuWorker,
|
||||
format::{Format, XRGB8888},
|
||||
gfx_api::{
|
||||
AsyncShmGfxTexture, BufferResvUser, GfxContext, GfxError, GfxFormat, GfxFramebuffer,
|
||||
GfxImage, GfxInternalFramebuffer, ResetStatus, ShmGfxTexture,
|
||||
AsyncShmGfxTexture, BufferResvUser, GfxBlendBuffer, GfxContext, GfxError, GfxFormat,
|
||||
GfxFramebuffer, GfxImage, GfxInternalFramebuffer, ResetStatus, ShmGfxTexture,
|
||||
},
|
||||
gfx_apis::gl::{
|
||||
GfxGlState, RenderError, Texture,
|
||||
|
|
@ -339,4 +339,12 @@ impl GfxContext for GlRenderContext {
|
|||
fn sync_obj_ctx(&self) -> Option<&Rc<SyncObjCtx>> {
|
||||
Some(&self.sync_ctx)
|
||||
}
|
||||
|
||||
fn acquire_blend_buffer(
|
||||
&self,
|
||||
_width: i32,
|
||||
_height: i32,
|
||||
) -> Result<Rc<dyn GfxBlendBuffer>, GfxError> {
|
||||
Err(GfxError(Box::new(RenderError::NoBlendBuffer)))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ use {
|
|||
crate::{
|
||||
format::Format,
|
||||
gfx_api::{
|
||||
AcquireSync, AsyncShmGfxTextureCallback, GfxApiOpt, GfxError, GfxFramebuffer,
|
||||
GfxInternalFramebuffer, GfxStagingBuffer, PendingShmTransfer, ReleaseSync, ShmMemory,
|
||||
SyncFile,
|
||||
AcquireSync, AsyncShmGfxTextureCallback, GfxApiOpt, GfxBlendBuffer, GfxError,
|
||||
GfxFramebuffer, GfxInternalFramebuffer, GfxStagingBuffer, PendingShmTransfer,
|
||||
ReleaseSync, ShmMemory, SyncFile,
|
||||
},
|
||||
gfx_apis::gl::{
|
||||
RenderError,
|
||||
|
|
@ -106,6 +106,7 @@ impl GfxFramebuffer for Framebuffer {
|
|||
ops: &[GfxApiOpt],
|
||||
clear: Option<&Color>,
|
||||
_region: &Region,
|
||||
_blend_buffer: Option<&Rc<dyn GfxBlendBuffer>>,
|
||||
) -> Result<Option<SyncFile>, GfxError> {
|
||||
(*self)
|
||||
.render(acquire_sync, ops, clear)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue