diff options
author | Brian Salomon <bsalomon@google.com> | 2017-07-20 20:48:12 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-20 20:48:23 +0000 |
commit | 807371c15bd742efb98a9df6e1dee73e8bda8af5 (patch) | |
tree | 3fd563c6347d5948e3a1410adffdf46492bdbd4a /include/gpu/GrTypes.h | |
parent | 3b59af5bf88920515835c79fe07c302438dc8e55 (diff) |
Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."
This reverts commit e2d37c2a07f5473e5fc6fb65e9e23e14127580e9.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.
>
> Also removes a reference to GrBackendTextureDesc in a comment and updates markdown docs.
>
> Docs-Preview: https://skia.org/?cl=24861
> Bug: skia:
> Change-Id: Ic6490d5ef46953450e6dee69271397bb2b94d0d6
> Reviewed-on: https://skia-review.googlesource.com/24861
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I4b85b529727f0bf5aec21d87e725a8195666e2e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/25182
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrTypes.h')
-rw-r--r-- | include/gpu/GrTypes.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 8d76364e20..a343f03817 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -647,6 +647,39 @@ enum GrWrapOwnership { /////////////////////////////////////////////////////////////////////////////// /** + * Gr can wrap an existing render target created by the client in the 3D API + * with a GrRenderTarget object. The client is responsible for ensuring that the + * underlying 3D API object lives at least as long as the GrRenderTarget object + * wrapping it. We require the client to explicitly provide information about + * the target, such as width, height, and pixel config rather than querying the + * 3D API for these values. We expect these properties to be immutable even if + * the 3D API doesn't require this (OpenGL). + */ + +struct GrBackendRenderTargetDesc { + GrBackendRenderTargetDesc() { memset(this, 0, sizeof(*this)); } + int fWidth; //<! width in pixels + int fHeight; //<! height in pixels + GrPixelConfig fConfig; //<! color format + GrSurfaceOrigin fOrigin; //<! pixel origin + /** + * The number of samples per pixel. Gr uses this to influence decisions + * about applying other forms of anti-aliasing. + */ + int fSampleCnt; + /** + * Number of bits of stencil per-pixel. + */ + int fStencilBits; + /** + * Handle to the 3D API object. + * OpenGL: FBO ID + * Vulkan: GrVkImageInfo* + */ + GrBackendObject fRenderTargetHandle; +}; + +/** * The GrContext's cache of backend context state can be partially invalidated. * These enums are specific to the GL backend and we'd add a new set for an alternative backend. */ |