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>
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 6beb11e..470ab7d 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -355,7 +355,7 @@
// Test-only entry point - should decrease in use as proxies propagate
static sk_sp<GrSurfaceContext> TestCopy(GrContext* context, const GrSurfaceDesc& dstDesc,
- GrSurfaceProxy* srcProxy);
+ GrSurfaceOrigin, GrSurfaceProxy* srcProxy);
bool isWrapped_ForTesting() const;
@@ -367,9 +367,10 @@
protected:
// Deferred version
- GrSurfaceProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags)
- : GrSurfaceProxy(nullptr, LazyInstantiationType::kSingleUse,
- desc, fit, budgeted, flags) {
+ GrSurfaceProxy(const GrSurfaceDesc& desc, GrSurfaceOrigin origin, SkBackingFit fit,
+ SkBudgeted budgeted, uint32_t flags)
+ : GrSurfaceProxy(nullptr, LazyInstantiationType::kSingleUse, desc, origin, fit,
+ budgeted, flags) {
// Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources
}
@@ -377,8 +378,8 @@
// Lazy-callback version
GrSurfaceProxy(LazyInstantiateCallback&& callback, LazyInstantiationType lazyType,
- const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted,
- uint32_t flags);
+ const GrSurfaceDesc& desc, GrSurfaceOrigin origin, SkBackingFit fit,
+ SkBudgeted budgeted, uint32_t flags);
// Wrapped version
GrSurfaceProxy(sk_sp<GrSurface> surface, GrSurfaceOrigin origin, SkBackingFit fit);