aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProxyProvider.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-03 22:43:43 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-05 18:50:25 +0000
commit2a4f983c94e4f749fe24b08bc8b5ae7cc8550d1d (patch)
treee89d794eeffacf09124be0cee8bfc70001be2856 /src/gpu/GrProxyProvider.h
parent1a8d762a18d6f6494408a3a5e06a80097f8b85f7 (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/GrProxyProvider.h')
-rw-r--r--src/gpu/GrProxyProvider.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h
index 254686a613..20d546fbab 100644
--- a/src/gpu/GrProxyProvider.h
+++ b/src/gpu/GrProxyProvider.h
@@ -65,15 +65,15 @@ public:
* DDL TODO: remove the remaining Skia-internal use of this method and make it truly
* testing-only.
*/
- sk_sp<GrTextureProxy> createInstantiatedProxy(const GrSurfaceDesc&, SkBackingFit, SkBudgeted,
- uint32_t flags = 0);
+ sk_sp<GrTextureProxy> createInstantiatedProxy(const GrSurfaceDesc&, GrSurfaceOrigin,
+ SkBackingFit, SkBudgeted, uint32_t flags = 0);
/*
* Create an un-mipmapped texture proxy with data.
* DDL TODO: need to refine ownership semantics of 'srcData' if we're in completely
* deferred mode
*/
- sk_sp<GrTextureProxy> createTextureProxy(const GrSurfaceDesc&, SkBudgeted,
+ sk_sp<GrTextureProxy> createTextureProxy(const GrSurfaceDesc&, GrSurfaceOrigin, SkBudgeted,
const void* srcData, size_t rowBytes);
/*
@@ -95,7 +95,7 @@ public:
* simply has space allocated for the mips. We will allocated the full amount of mip levels
* based on the width and height in the GrSurfaceDesc.
*/
- sk_sp<GrTextureProxy> createMipMapProxy(const GrSurfaceDesc&, SkBudgeted);
+ sk_sp<GrTextureProxy> createMipMapProxy(const GrSurfaceDesc&, GrSurfaceOrigin, SkBudgeted);
/*
* Creates a new mipmapped texture proxy for the bitmap with mip levels generated by the cpu.
@@ -106,12 +106,12 @@ public:
/*
* Create a GrSurfaceProxy without any data.
*/
- sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc&, GrMipMapped, SkBackingFit, SkBudgeted,
- uint32_t flags);
+ sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc&, GrSurfaceOrigin, GrMipMapped,
+ SkBackingFit, SkBudgeted, uint32_t flags);
- sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc& desc, SkBackingFit fit,
- SkBudgeted budgeted, uint32_t flags = 0) {
- return this->createProxy(desc, GrMipMapped::kNo, fit, budgeted, flags);
+ sk_sp<GrTextureProxy> createProxy(const GrSurfaceDesc& desc, GrSurfaceOrigin origin,
+ SkBackingFit fit, SkBudgeted budgeted, uint32_t flags = 0) {
+ return this->createProxy(desc, origin, GrMipMapped::kNo, fit, budgeted, flags);
}
// These match the definitions in SkImage & GrTexture.h, for whence they came
@@ -168,11 +168,11 @@ public:
* callback should cleanup any resources it captured and return an empty sk_sp<GrTextureProxy>.
*/
sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&,
- GrMipMapped, GrRenderTargetFlags, SkBackingFit,
- SkBudgeted);
+ GrSurfaceOrigin, GrMipMapped, GrRenderTargetFlags,
+ SkBackingFit, SkBudgeted);
sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&,
- GrMipMapped, SkBackingFit, SkBudgeted);
+ GrSurfaceOrigin, GrMipMapped, SkBackingFit, SkBudgeted);
/**
* Fully lazy proxies have unspecified width and height. Methods that rely on those values
@@ -183,6 +183,7 @@ public:
sk_sp<GrRenderTargetProxy> createLazyRenderTargetProxy(LazyInstantiateCallback&&,
const GrSurfaceDesc&,
+ GrSurfaceOrigin origin,
GrRenderTargetFlags, Textureable,
GrMipMapped, SkBackingFit, SkBudgeted);