Make fully lazy proxies possess an origin
Change-Id: Icd3d68bce78568562aa12167a58b6d6e5064b124
Reviewed-on: https://skia-review.googlesource.com/106901
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h
index 4803758..7e7f852 100644
--- a/src/gpu/GrProxyProvider.h
+++ b/src/gpu/GrProxyProvider.h
@@ -141,8 +141,7 @@
GrSurfaceOrigin origin,
int sampleCnt);
- using LazyInstantiateCallback = std::function<sk_sp<GrSurface>(GrResourceProvider*,
- GrSurfaceOrigin* outOrigin)>;
+ using LazyInstantiateCallback = std::function<sk_sp<GrSurface>(GrResourceProvider*)>;
enum class Textureable : bool {
kNo = false,
kYes = true
@@ -166,8 +165,12 @@
sk_sp<GrTextureProxy> createLazyProxy(LazyInstantiateCallback&&, const GrSurfaceDesc&,
GrMipMapped, SkBackingFit, SkBudgeted);
+ /**
+ * Fully lazy proxies have unspecified width and height. Methods that rely on those values
+ * (e.g., width, height, getBoundsRect) should be avoided.
+ */
sk_sp<GrTextureProxy> createFullyLazyProxy(LazyInstantiateCallback&&,
- Renderable, GrPixelConfig);
+ Renderable, GrSurfaceOrigin, GrPixelConfig);
sk_sp<GrRenderTargetProxy> createLazyRenderTargetProxy(LazyInstantiateCallback&&,
const GrSurfaceDesc&, Textureable,