diff options
author | Brian Salomon <bsalomon@google.com> | 2017-08-31 20:04:00 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-31 20:04:12 +0000 |
commit | f43d0001e4139978fa9699083f4c62f92eb03106 (patch) | |
tree | 79857050daf6abad47633da4023c3d8989637a15 /include | |
parent | 085c0862f674337c5a60f8c46da4c12f0d12511a (diff) |
Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""""
This reverts commit 6df4d6be0d025211400de6a910e17f2a87219887.
Reason for revert: Google3 fix landed
Original change's description:
> Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
>
> This reverts commit 71554bc256b705fe959b7aa2fb2f24ed48782362.
>
> Reason for revert: Google3
>
> Original change's description:
> > Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> >
> > This reverts commit 807371c15bd742efb98a9df6e1dee73e8bda8af5.
> >
> > Docs-Preview: https://skia.org/?cl=40260
> > Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> > Reviewed-on: https://skia-review.googlesource.com/40260
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/41500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: I827419bb19972c3644929a8c984bb9534baab0ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkSurface.h | 28 | ||||
-rw-r--r-- | include/gpu/GrBackendSurface.h | 6 | ||||
-rw-r--r-- | include/gpu/GrTypes.h | 33 |
3 files changed, 3 insertions, 64 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 9769da4c0f..890532f983 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -94,16 +94,6 @@ public: GrSurfaceOrigin origin, int sampleCnt, sk_sp<SkColorSpace>, const SkSurfaceProps*); - /** - * Used to wrap a pre-existing 3D API rendering target as a SkSurface. Skia will not assume - * ownership of the render target and the client must ensure the render target is valid for the - * lifetime of the SkSurface. - */ - static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*, - const GrBackendRenderTargetDesc&, - sk_sp<SkColorSpace>, - const SkSurfaceProps*); - static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext*, const GrBackendRenderTarget&, GrSurfaceOrigin origin, @@ -113,10 +103,9 @@ public: /** * Used to wrap a pre-existing 3D API texture as a SkSurface. Skia will treat the texture as * a rendering target only, but unlike NewFromBackendRenderTarget, Skia will manage and own - * the associated render target objects (but not the provided texture). The kRenderTarget flag - * must be set on GrBackendTextureDesc for this to succeed. Skia will not assume ownership - * of the texture and the client must ensure the texture is valid for the lifetime of the - * SkSurface. + * the associated render target objects (but not the provided texture). Skia will not assume + * ownership of the texture and the client must ensure the texture is valid for the lifetime + * of the SkSurface. */ static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext*, const GrBackendTexture&, @@ -126,17 +115,6 @@ public: const SkSurfaceProps*); /** - * Legacy version of the above factory, without color space support. This creates a "legacy" - * surface that operate without gamma correction or color management. - */ - static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext* ctx, - const GrBackendRenderTargetDesc& desc, - const SkSurfaceProps* props) { - return MakeFromBackendRenderTarget(ctx, desc, nullptr, props); - } - - - /** * Return a new surface whose contents will be drawn to an offscreen * render target, allocated by the surface. */ diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h index c9a9ad02e6..55cec78548 100644 --- a/include/gpu/GrBackendSurface.h +++ b/include/gpu/GrBackendSurface.h @@ -108,12 +108,6 @@ public: #endif private: - // Temporary constructor which can be used to convert from a GrBackendRenderTargetDesc. - GrBackendRenderTarget(const GrBackendRenderTargetDesc& desc, GrBackend backend); - - // Friending for access to above constructor taking a GrBackendRenderTargetDesc - friend class SkSurface; - int fWidth; //<! width in pixels int fHeight; //<! height in pixels diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 4839e9a121..6ba9ffe429 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -642,39 +642,6 @@ 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. */ |