diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-03 22:43:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-05 18:50:25 +0000 |
commit | 2a4f983c94e4f749fe24b08bc8b5ae7cc8550d1d (patch) | |
tree | e89d794eeffacf09124be0cee8bfc70001be2856 /src/gpu/GrTextureRenderTargetProxy.cpp | |
parent | 1a8d762a18d6f6494408a3a5e06a80097f8b85f7 (diff) |
Remove GrSurfaceOrigin from GrSurfaceDesc.
This field has no interpretation at the GrTexture/GrGpu as the orientation is
handled at the GrSurfaceProxy level.
This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves.
Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772
Reviewed-on: https://skia-review.googlesource.com/111806
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index 213359b7c0..c36867daa7 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -19,32 +19,33 @@ // GrRenderTargetProxy) so its constructor must be explicitly called. GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps, const GrSurfaceDesc& desc, + GrSurfaceOrigin origin, GrMipMapped mipMapped, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags) - : GrSurfaceProxy(desc, fit, budgeted, flags) + : GrSurfaceProxy(desc, origin, fit, budgeted, flags) // for now textures w/ data are always wrapped - , GrTextureProxy(desc, mipMapped, fit, budgeted, nullptr, 0, flags) - , GrRenderTargetProxy(caps, desc, fit, budgeted, flags) { -} + , GrTextureProxy(desc, origin, mipMapped, fit, budgeted, nullptr, 0, flags) + , GrRenderTargetProxy(caps, desc, origin, fit, budgeted, flags) {} // Lazy-callback version GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(LazyInstantiateCallback&& callback, LazyInstantiationType lazyType, const GrSurfaceDesc& desc, + GrSurfaceOrigin origin, GrMipMapped mipMapped, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags, GrRenderTargetFlags renderTargetFlags) - : GrSurfaceProxy(std::move(callback), lazyType, desc, fit, budgeted, flags) + : GrSurfaceProxy(std::move(callback), lazyType, desc, origin, fit, budgeted, flags) // Since we have virtual inheritance, we initialize GrSurfaceProxy directly. Send null // callbacks to the texture and RT proxies simply to route to the appropriate constructors. - , GrTextureProxy(LazyInstantiateCallback(), lazyType, desc, mipMapped, fit, budgeted, flags) - , GrRenderTargetProxy(LazyInstantiateCallback(), lazyType, desc, fit, budgeted, flags, - renderTargetFlags) { -} + , GrTextureProxy(LazyInstantiateCallback(), lazyType, desc, origin, mipMapped, fit, + budgeted, flags) + , GrRenderTargetProxy(LazyInstantiateCallback(), lazyType, desc, origin, fit, budgeted, + flags, renderTargetFlags) {} // Wrapped version // This class is virtually derived from GrSurfaceProxy (via both GrTextureProxy and |